Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Where is the Approval State?

catarinapereira
Tera Contributor

I created a new table named Order without a "State" field. I've set up a workflow, and created a "My Approvals" module. I now need to access the state of the approval in order to send an email if the state changes to "Approved".

I created a business rule for the table Order that runs a script if the condition "current.state.changesTo('approved')" is met. It's not working and I believe it's related to the fact that there is no State field in the Order table. I have no idea where the State that appears in My Approvals section is, or to what table it belongs.

Can anyone explain this to me?

Have a lovely day and thank you very much in advance.

5 REPLIES 5

Hey Shyama,



I managed to solve the issue by myself. When I created the Order table I didn't extend any table, so there wasn't any State field. However, the information I was looking for was on the default table "sysapproval_approver", I just wasn't looking in the right place. Thank you anyway for your attention, have a lovely week!