Hi,
We have a user who has access rights to create sales order hence his/her security role (let's say it as A) has access Read, Update, Create access rights. However, it doesn't have 'Delete' rights. That means it cannot delete sales order.
Now, We have a SalesCopying screen being used in one of the customization where it creates a return order temporarily and if user clicks on 'Cancel' button on screen, this SalesCopying screen getting closed and that temporarily created Return order gets deleted at the same time. This works fine for the user who has 'Delete' access rights on SalesTable. but not the above mentioned security role A. When this user clicks cancel, the SalesCopying screen gets closed, however, it cannot delete that temporary return order and gets the error message that 'Access denied to table Sales orders (salesTable).'
Is there any way we can grant the permission through the X++ code for deletion of this temporary return order for this security role and revoke permission after that?
That way, the user won't realize that he/she had 'Delete' access rights for the fraction of second and our job will be done too.
Anyone faced this before?
~ VD