Skip to main content
Nintex Community Menu Bar
Question

help me to write javascript snippet of this onclick javascript button

  • July 10, 2024
  • 2 replies
  • 3 views

Forum|alt.badge.img+5

{!REQUIRESCRIPT(“/soap/ajax/26.0/connection.js”)} 
{!REQUIRESCRIPT(“/support/console/26.0/integration.js”)} 

var ids = {!GETRECORDIDS($ObjectType.Ckte__c)}; 
if (!ids || ids.length < 1) 
alert(“Please select at least one record.”); 
else 

var redirectUrl = “/apex/loop__masslooplus?&retURL=” + encodeURI(window.location.pathname+window.location.search); 
redirectUrl += “&recordIds=”+ids.join(“,”); 
redirectUrl += “&sessionId={!$Api.Session_ID}”; 
window.location.href = redirectUrl; 
}


for the above code i have written the following code to snippet:



var ids = {!GETRECORDIDS($ObjectType.Ckte__c)}; 
if (!ids || ids.length < 1) 
alert(“Please select at least one record.”); 
else 

var redirectUrl = “/apex/loop__masslooplus?&retURL=” + encodeURI(window.location.pathname+window.location.search); 
redirectUrl += “&recordIds=”+ids.join(“,”); 
redirectUrl += “&sessionId={!$Api.Session_ID}”; 
window.location.href = redirectUrl; 
}

I m getting error in the first line } expected … dont know why this error help me

2 replies

Forum|alt.badge.img+4

Hi,

Could you please share shot for better understanding?

 
Thanks


Forum|alt.badge.img+5

I have solved this using
var ids = skuid.$.map(arguments[0].list.getSelectedItems(),function(item){ return item.row.Id; 
});

Thanx Gopal for reply.