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 :
Small and medium business | Business Central, N...
Suggested Answer

If Salesperson is changed on Customer table, how to changed it on Posted documents

(0) ShareShare
ReportReport
Posted on by 6

We need to change Salesperson codes on Customer card to another salesperson code.  If it changed on customer table, I understand we have posted documents related to previous Salesperson codes. Also, I understand posted documents cannot be changed

However, I would need advice how to change in the Sales Invoice Header, Value Entry & Cust. Ledger Entry Table. [ for reporting purpose]  Can I directly modify the value of "Salesperson Code" in Sales Invoice Header, Value Entry & Cust. Ledger Entry Table. Using configuration package,

  1. Create configuration package
  2. Add related table s [Sales Invoice Header, Value Entry & Cust. Ledger Entry Table]
  3. Export by excel
  4. Make adjustment to data in excel and save the file
  5. Go back to configuration package and import by excel
  6. Apply the data

 

Appreciate your valuable advice please? am using BC 19 at this point.

Many Thanks, Indu

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,788 Moderator on at

    Hi,

    Your question is more into change Posted data, so you can not do that in anyways, in that case if there is no option to change the posted data you need to consult with your development partner to assist in this case.

    Thanks.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,161 Moderator on at

    If you simply rename the sales person. All related data will be updated.

    So if you have  a sales person IJ that you want to change to f.ex. 100 you can simply do that in the sales person page and all related entries will be updated.

    I would not recommend updating already posted transactions. If you really need to do that you should contact your partner and have them assist you in the process to make sure your data stays consitant.

  • Hein Kruger Profile Picture
    666 on at

    If it's only for reporting purposes and you have a business rule in place to always use the Sales person code assigned to the Customer. You can modify the report.  In the OnAfterGet procedure of the Header dataitem. Get the Custom record and assign the SalesPerson Code as a column in the header.  It will look something like this.:

    dataitem(Header; "Sales Invoice Header")

    {

    //Replace this column with the following if its a new report otherwise in the report extension you can add the code.

    //column(SalespersonCode_Header; "Salesperson Code")

    //           {

    //           }

    column(SalespersonCode_Header; CustomerSalesPersonCode)

            {

           }

    trigger OnAfterGetRecord()

               var

                   Customer: Record Customer;

               begin

                   Customer.Reset();

                   Customer.SetRange("No.",Header."Sell-to Customer No.");

                   if Customer.FindFirst() then

                   CustomerSalesPersonCode :=  Customer."Sales Person Code";

              end

    }

    var

    CustomerSalesPersonCode : Code[30];

    It is not ideal but it should work. I would advise a boolean on the request page to ask the user for which Sales Person Code the report should show but then the code will change a bit.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,958 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,101 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans