Employee Relation catalog Item Description

_Samay
Tera Expert

Dear Team,

We are having a requirement where into one of the record producers for employee relations. We have to populate description based on our business needs not whatever is getting populated from out of the box.

I can see, record producer is having a line of script as per below.

new er_Producer().createCaseFromProducer(current, producer, cat_item.sys_id);

After commenting this line into record producer script as well as remove completely from record producer but still system is populating description with Question and Answers of record producer.

 

After removing above OOB script line, we have written our own script with record producers variables and setting into description bot system is overwriting those as well. We have seen into audit logs.

 

 

Thanks,

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@_Samay 

ideally after commenting it should not set

Comment that line in record producer script

Write before insert business rule and try to set the description

if that doesn't work then use after business rule and use current.setWorkflow(false) just before the update

// your logic to set description here

current.setWorkflow(false);
current.update();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@_Samay 

ideally after commenting it should not set

Comment that line in record producer script

Write before insert business rule and try to set the description

if that doesn't work then use after business rule and use current.setWorkflow(false) just before the update

// your logic to set description here

current.setWorkflow(false);
current.update();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@_Samay 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Dear @Ankur Bawiskar - Business rule solution is working with current.setWorkflow(false); but it's also stopping server side objects like notifications .... 

@_Samay 

that's bound to happen.

I don't think any other solution as of now.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader