Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Unanswered

how to remove extra semi colon from jscript

Posted on by 5

how can i remove the extra semicolon from jscript ?

for(var i=0;i<selectedTexts.length;i++)
{
Xrm.WebApi.online.retrieveMultipleRecords("role", "?$select=roleid&$filter=(name eq '"+selectedTexts[i]+"' and _businessunitid_value eq "+buId+")").then(
function success(results) {
console.log(results);
for (var i = 0; i < results.entities.length; i++) {
var result = results.entities[i];
var roleid = result["roleid"];
roleConfiguration=roleConfiguration+roleid+";";
formContext.getAttribute("asr_configuredrole").setValue(roleConfiguration);
}

Any suggestion would be greately appriciated

  • a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: how to remove extra semi colon from jscript

    Hello,

    Can you please clarify what's the end goal of the script?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,104 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans