Need to understand what triggered the info message

Annie10
Tera Contributor

Hello,

The following info. message were triggered when a RITM gets approved or rejected.  Could someone please let me know what is the name of the object that fired those messages. This is for educational purposes.  Thank you

 

 

Annie10_0-1717721677565.png

 

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hi,

That is triggered by the approval record on the sysapproval_approver table.

When a approval record is approved or rejected, it'll call a script include called: ApprovalUserFeedback.

Inside that script include, you'll see all the various infoMessages that are triggered.

Example:

AllenAndreas_0-1717725207193.png

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

10 REPLIES 10

Hi @Annie10 

 

Thank you for the kind words!

 

Yes. A script include, server or client-callable, can be called from pretty much anywhere in the platform. Server side code, you can call server side script includes. Client-side code, you can call client-callable script includes...then a client callable could call a server side script include and so on. I don't want to get too confusing there.

 

For what you've replied with, yes:

  1. Current record the button was clicked on gets updated to Rejected state
  2. The current record is then updated officially
  3. Then the script include: ApprovalUserFeedback is called as well as the method (or function) within it called "rejected" and its passing the "current" object (so far more than just the sys_id, so "everything" about the current record) as a parameter to it. This allows the rejected function in the script include to then have the details of the current record, etc.

Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi @Allen Andreas 

Thank you sincerely for investing your time and effort in providing such a detailed explanation. I truly appreciate it and have gained valuable knowledge from it.

Hi @Annie10 

You're welcome. If you don't mind, if one of my replies above helped answer your question, please consider marking it as "Accept Solution" to help close out your thread and also point others to the answer in the future, in case they need it?

Thanks and take care! 😀


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Jitendra Diwak1
Kilo Sage

Hi @Annie10,

 

In future if you want to know this then you copy the message and try to search in all script part in SCRIPT field then you will definitely find this.

 

Please accept my solution if it works for you and thumps up.

 

Thanks

Jitendra

Please accept my solution if it works for and thumps up.

Hello @Jitendra Diwak1 

I occasionally encounter this type of message while using the ServiceNow system. I end up spending time googling it, but sometimes I cannot find an answer. I know you mentioned "Search in all script part in SCRIPT field." Could you please guide me on how to get there? Your guidance will definitely help me in the near future.  Thank you