web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Disable Edit on Sales Order Form

(0) ShareShare
ReportReport
Posted on by 40

Hi,

In sales order form, the current system allow any user to easily modify/edit the Sales Order of other user's Sales Order.

I want to have a condition on sales order form, where to only allow Sales Order's sales responsible to modify/edit the Sales Order record.

So if the user is not the Sales Order's sales responsible, he/she cannot modify/edit the Sales Order record.

How can i make the Sales Order to only be editable by the Sales Order's sales responsible?

Thanks in advance.

Regards,
Afieq

I have the same question (0)
  • Suggested answer
    Afieq Suhaimi Profile Picture
    40 on at
    RE: Disable Edit on Sales Order Form

    Hi all,

    Thanks for your suggestions.

    I have figure out the solution for my problem.

    I able to achieve this by create a custom code method based on the value of Current User Id and the Sales Order Sales Responsible when entering the Sales Order Form.

    I create a condition on the form method where if the current user id is not equal to sales responsible for selected Sales Order, then i disable the allowEdit for the SalesTable datasource.

    Regards,

    Afieq

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    298,933 Super User 2025 Season 2 on at
    RE: Disable Edit on Sales Order Form

    Hi Afieq,

    Alex is correct. You can implement a security policy using the extensible data security (XDS) framework. The curuserid() range is working. However, you also need to think of what happens if there is a need to change the sales order and the user is not available, due to vacation, illness or termination of the contract.

    For sure the system administrator can then change the responsible user on the sales order. But should the manager of the responsible also have edit rights? Also make sure that posting of the sales order won't be affected when you create the policy, so it should be associated with one or more roles and not a general policy active for all roles.

  • alexmeyer.itguy Profile Picture
    648 on at
    RE: Disable Edit on Sales Order Form

    Afieq,

    You might be able to get this to work via XDS and putting the curUserId() method in the policy to make it dynamic for any user accessing this form, and then comparing that value to the who is responsible on a Sales Order. I have not tested this so am not sure if this is allowed or not but would be the only way I could see to achieve what you are purposing.

  • Suggested answer
    Mika Hartio Profile Picture
    101 on at
    RE: Disable Edit on Sales Order Form

    Hello Afieq.

    You can for example create a new security role in the security configuration menu and edit it to be 'view only' for the sales order related data.

    You can then assign the newly created role to the user.

    For example:

    1. See the permissions set for the original security role that you have set for SO responsible person. (let's call this role (SO - Edit))

    2. Create a new security role. (let's call this one SO - View). This can be done by duplicating the previous role.

    3. Adjust the security permissions for the new role

    4. Assign the new role to the "view only" user. (make sure that the user no longer has the "SO - Edit" role assigned, since the user will be able to still edit the orders otherwise) 

    You should also do some tests in the test environment before starting to use the configuration in the production environment.

    Best regards,

    Mika Hartio

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,258

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 949 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 631 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans