- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 11:40 PM
Hi All,
There's a field in approver table named "Approver Source" which tells where the record is approved from, the field has various choices like Mobile UI, Tablet, Desktop UI, Email.
Requirement is I want to add a new choice in the Approver Source : List view
(if a record is approved from list view by right click on the record) it should then display List view in Approver Source.
How to achieve this?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2022 03:31 AM
Hello Hardik,
To complete this requirement you can do the following steps:
1, Create another choice in the Approval source field:
2. Create one more field in the Approvals table called u_list_approved as a true/false field, to check if the record is modified via list.
3. Create a list edit ACL on the approver table and in the advanced script set the u_list_approved to true, this steps ensures that whenever someone approves or rejects the record via list it will update this field.
Script inside list edit ACL:
current.u_list_approved=true;
current.update();
gs.info("inside acl");
answer=true;
4. modify the "Tracks approval source" Business rule:
Just modify the last else part of the script, to update list in Approval source.
Business rule script to modify:
Once you follow these steps, you will be able to achieve your requirement. However, it might lead to a lot of global exceptions in the client environment as you might not have access to everything.
Result:
I hope this helps you, If you find this helpful please mark this solution as helpful and correct, as an appreciation for the time I spent building these examples for you. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 08:41 AM
Hey Hardik,
You have to make a few changes to UI actions of approve and reject, as the two scenarios you mentioned doesn't get applied to list ACL's directly.
I have already made the changes and it's working fine for me for both of these scenarios.
So, follow these steps to achieve the same.
1. Open UI Actions of approve. Choose the one which are from approval table and has List Action as true. There would be 3 UI Actions.
2. Open all 3 UI Action and add this one line of script which is also there in the ACL. Add it before current.update().
current.u_list_approved=true;
3. Open all 3 Reject UI Action and perform the same step as step 2.
I have tested this, it will solve your issue.
I hope this helps you, If you find this helpful. Please mark this as helpful. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2022 03:31 AM
Hello Hardik,
To complete this requirement you can do the following steps:
1, Create another choice in the Approval source field:
2. Create one more field in the Approvals table called u_list_approved as a true/false field, to check if the record is modified via list.
3. Create a list edit ACL on the approver table and in the advanced script set the u_list_approved to true, this steps ensures that whenever someone approves or rejects the record via list it will update this field.
Script inside list edit ACL:
current.u_list_approved=true;
current.update();
gs.info("inside acl");
answer=true;
4. modify the "Tracks approval source" Business rule:
Just modify the last else part of the script, to update list in Approval source.
Business rule script to modify:
Once you follow these steps, you will be able to achieve your requirement. However, it might lead to a lot of global exceptions in the client environment as you might not have access to everything.
Result:
I hope this helps you, If you find this helpful please mark this solution as helpful and correct, as an appreciation for the time I spent building these examples for you. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2022 09:20 AM
@Taha Habib ,
Thanks a lot for your efforts, it worked. (Y)
But, one doubt it only works when value is changed on double click and value set to Approve/Reject
It does not work on right click --> Approve/Reject.
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2022 10:22 AM
It looks like the List ACL doesn't work when you do right click and approve or reject a record, which is weird.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2023 11:10 PM
Hi @Taha Habib ,
I am getting the "Approval source" as List if I am doing a cell edit in the list view, so that's working fine.
But it is not coming up in 2 ways:
1) First, if we right click and approve/reject.
2) If we approve/reject from the Actions on selected dropdown in the right corner.
Can you please suggest on this?
Thanks!