User Approval script is not working for the custom table

H M Aishwarya1
Tera Guru

Hi,

 

We have a requirement to trigger the user Approval through the workflow for the custom table inherited from the change_request table

 

The 'Business Owner' is the reference field configured in the groups table and in the change request the field is dot walked sting field and its read only. Here i have to trigger the Approval for the Business owner which is populated from the group table.

 

field in the group table: 

HMAishwarya1_0-1746790582531.png

 

field in the change form:

HMAishwarya1_1-1746790669372.png

 

 

Any suggestion would be highly Appreciated!

 

Thank You.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@H M Aishwarya1 

simply use advanced script in "User or Group" Approval activity in workflow like this

answer = [];
// give the correct field names here
answer.push(current.groupField.businessOwnerField.toString());

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

@H M Aishwarya1 

simply use advanced script in "User or Group" Approval activity in workflow like this

answer = [];
// give the correct field names here
answer.push(current.groupField.businessOwnerField.toString());

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,

 

I have tried this and the Approval is getting skipped.

 

HMAishwarya1_0-1746794106541.png

 

 

@H M Aishwarya1 

share what script you are using?

check this

1) does that group have active group members, not locked out

Determining causes for skipped approvals (group or user) 

also check this

Workflow Approval Group is skipped and approved? 

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

H M Aishwarya1
Tera Guru

Hi,

 

I did alter the condition and it worked for me.

 

Thanks!