I am in a situaltion where we want people to be able to approve Purchase Invoice, on page 662 Approval Request Entries.
But it has a OnAfterGetCurrRecord trigger where it gets the record in the Table ID field with a RecRef, so you would need to have the Read permission for that record, Purchase Header in this instance.
But i dont want them to have read permission to Purchase Header, and i cant seem to get an indirect permission to work, because i am not able to add the permission property to a page extension.
So i dont know what to do in this situation, i dont see a solution atm.
The code from page 662
trigger OnAfterGetCurrRecord() var RecRef: RecordRef; begin ShowRecCommentsEnabled := RecRef.Get("Record ID to Approve"); end;
In that case you need to check if any approver id is maintained on the Purchase header, which I am not sure, so that you can write your logic only allow only those purchases which are going to approve.
Thanks
Because by giving them read permission to Purchase header they would be able to see all the purchase invoices, and i only want them to see the once they need to approve.
If you want you can die the "Record" button by using Page extension of that page.
Thanks.
Then you will have to build your own page.
But is it not a bit weird that you want them to approve something you do not want them to have read permissions to?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156