Skip to main content

Notifications

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,646
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,646 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,077 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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans