how to get the value from sysid in business rules

Chandra31
Tera Contributor

Hi Team,

how to get the value from sysid in business rules.

Thanks,

Chandra

14 REPLIES 14

Andrii
Kilo Guru

Hi,



could you please explain your question a bit more detailed?


Chandra31
Tera Contributor

Hi




How to get the sysid value by using business rules.



Thanks.


Chandra



On Sat, Nov 12, 2016 at 1:54 PM, scrumniashka <


Harsh Vardhan
Giga Patron

Hi Chandra,



Can you please send your script?



Please check the below thread.


Get sys id by display value




Thanks,


Harshvardhan




PS: Hit like, Helpful or Correct depending on the impact of the response


Hi Harsha,




Please find below script.



function onBefore(current, previous) {


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


var parentRecord = g_form.getReference('parent');


var gr = new GlideRecord('metric_instance');


gr.addQuery(String, Object, Object)('assignment_group');


gs.addInfoMessage(gr.getValue('assignment_group'));


/*gr.query();


while (gr.next()) {


gs.addInfoMessage(gr.number);getValue(String)



Thanks,


Chandra



On Sat, Nov 12, 2016 at 2:17 PM, harshvardhansingh <