Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

endsWith() in business rule

sigmachiuta
Kilo Guru

Can i use current.name.endsWith() in a BR?   It doesnt seem to only be running on those conditions but is meeting all conditions.   As if the condition does not apply

function onBefore(current, previous) {

  //This function will be automatically called when this rule is processed.

  if (current.name.endsWith('foo') || current.name.endsWith('bar')){

var gr= new GlideRecord('table')   .................

}

1 ACCEPTED SOLUTION

i ended up moving the condition in the script up to the actual condition on the BR, and that worked


View solution in original post

5 REPLIES 5

i ended up moving the condition in the script up to the actual condition on the BR, and that worked