how to show comments and attachment through specific user in servicenow

imkhan
Tera Contributor

Hi All,

 

How to show a specific user in activity? We are receiving 3rd party data through REST, and we are calling script include through client script, so this is designed that once the user loads the form, the 3rd party API will be called. If data is received in response related to the comment and attachment, should it reflect our integration user, not the current requester user?

 

Our script is running but showing current requester username who loading the form.

 

Thanks,

 

4 REPLIES 4

mohdarbaz
Kilo Guru

Hi @imkhan,

Could you please share the screenshots of clientscript and scriptinclude to examine further.

 

Regards,

Mohd Arbaz.

imkhan
Tera Contributor

Hi Arbaz,

please check the attached file.

 

Thanks

Ankur Bawiskar
Tera Patron
Tera Patron

@imkhan 

the script include and client script are running in the user's session and not the integration user and hence it's reflecting that.

Share your script include and client script

As workaround you can update the sys_created_by field in sys_journal_field table and sys_attachment table with that API integration user using GlideRecord

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

Hi Ankur,

Thanks for your reply!

please see script include and client script in attachment, and how to apply glide record on sys_journal_field and attachment through business rule after insert the record? can you please help on this

Thanks,