Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Create Customer Only When "Order" &"Guest" combination on sales quote page action using XMLPort

Posted on by 1,654
Hi Community,
 
I have a client's requirement which is as follows:
 
While Importing CSV Files using XMLPort, we're not creating customers directly into the System(Customer Table), we're creating customers in the customer table only when /Document Type/ is /Order/ & /Sell-to Customer No/ is /Guest/ in Sales Quote Page using AL Code. For that, I have created XMLPort which is shown in the below Image. 
 
 
When I'm trying to import my CSV File it Shows following Error
 
This is the data that I want to import
 
For Example When I import this file if /Document Type/ is /Order/ & /Sell-to Customer No/ is /Guest/ then Customer /ABC/ & /XYZ/ Should be added into Customer Table.
 
  • Inkey Solutions Profile Picture
    Inkey Solutions 1,654 on at
    Create Customer Only When "Order" &"Guest" combination on sales quote page action using XMLPort
    Hi @Inge M. Bruvik ,@Mohana Yadav
     
    Thank You for your Reply.
     
    @Mohana Yadav, No I don't have 77777 customer in the database.
     
    @Inge M. Bruvik, I have tried "OnAfterInsertRecord" trigger but it shows the following error. Do you have any other solution?
     
  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    Create Customer Only When "Order" &"Guest" combination on sales quote page action using XMLPort
    You can not create the customer in that trigger on the XML port.
    Try using the OnAfterInsertRecord trigger instead.
     
    In the OnPreXmlPort trigger your file is not read yet.
     
  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    Create Customer Only When "Order" &"Guest" combination on sales quote page action using XMLPort
    As per the error, do you have 77777 customer in your database?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans