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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

link customer and sales person on sales order

(0) ShareShare
ReportReport
Posted on by

hi.

i want to link customer and sales person on sales order, for this goal, i set each customer with sales person in customer from, but when i create a sales order and select a customer, it is possible to change sales person and i want to be a relation between customer and sales person that no body can change it. have solution?

Regards

*This post is locked for comments

  • dolee Profile Picture
    11,279 on at

    Hi,

    One way is to make changes in AOT. Set the "Allow edit" and "Allow edit on create" to false for the field that contains the sales person information.

    Regards,

    Dominic

  • Suggested answer
    Community Member Profile Picture
    on at

    You will be required to perform small customization as it is not the standard feature.

    Modify the method initfromCustTable() on table SalesTable

    in this method find out the customer's contact person and assign it to the SalesTable Contact person field

    on the SalesTable for set the contact person field as non editable.

    Please verify and let me know if you need further help for customization.

  • Community Member Profile Picture
    on at

    NITESH RANJAN

    Hi.

    i do what you say, but it dosen't work. what can i do?

    regards

  • Gertjan Profile Picture
    1,200 on at

    Can you provide the code you hve changed so that we can help you? Do you get an error or is the field not filled in? Did you try to debug your code?

  • Community Member Profile Picture
    on at

    Hi.

    i do what NITESH RANJAN say. Modify the method initfromCustTable() on table SalesTable

    in this method find out the customer's contact person and assign it to the SalesTable Contact person field

    on the SalesTable for set the contact person field as non editable. just this.

    regards

  • Community Member Profile Picture
    on at

    Hi.

    how can i find  customer's contact person in the method initfromCustTable()?

    regards

  • Suggested answer
    Community Member Profile Picture
    on at

    You have ContactPerson Table

    You can find record in Contact Person Table related to CustAccount as per you SalesTable.

    Please verify and update this helps you.

  • Community Member Profile Picture
    on at

    Hi.

    I provide just this code on initfromcusttable method but when i select customer, sales responsible doesn't field in, and get null value.

    regards

       if (this.CustAccount)

       {

           this.WorkerSalesResponsible = custTable::find(custTable.AccountNum).MainContactWorker;

       }

  • Suggested answer
    Community Member Profile Picture
    on at

    I don't think MainContactWorker is the correct field it should be ContactPersonId

    Please try using this field.

  • Community Member Profile Picture
    on at

    hi. i do what you say before but get error  that Operand types are not compatible with the operator.

    this.WorkerSalesResponsible = custTable::find(custTable.AccountNum).ContactPersonId;

    Regards

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans