Reg - Validate field while import

schoolkid
Member Posts: 103
Hi,
I have created a XML PORT to import Customer and it works fine,this is the XML File that i import into NAV
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<Customer>
<Customer_Master>
<No></No>
<Name>micheal</Name>
<SearchName></SearchName>
<Name2>Lawson</Name2>
<Address>no 10 Dale street</Address>
<Address2>lutjensee</Address2>
<City>Dresden</City>
<Contact/>
<PhoneNo/>
<CustomerPostingGroup>CUB</CustomerPostingGroup>
<PaymentTermsCode/>
<CountryRegionCode>A</CountryRegionCode>
<BillToCustomerNo>12345</<BillToCustomerNo> (If empty i need to fill NO. generated in NAV automatically)
<FaxNo/>
<GenBusPostingGroup>NL</GenBusPostingGroup>
<PostCode>01001</PostCode>
<VATBusPostingGroup>NL</VATBusPostingGroup>
</Customer_Master>
</Customer>
If the BILLTOID has values it will import the values in the XML port but what is required is when the BillToID is empty i need to write a condition that it should take the customers no which is generated when the file is imported.
i tried to add code in the OnBeforeInsert() trigger in the xml port but still in vain.
pls suggest in which trigger can i check the condition and execute it.
Thanks in Advancr
I have created a XML PORT to import Customer and it works fine,this is the XML File that i import into NAV
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<Customer>
<Customer_Master>
<No></No>
<Name>micheal</Name>
<SearchName></SearchName>
<Name2>Lawson</Name2>
<Address>no 10 Dale street</Address>
<Address2>lutjensee</Address2>
<City>Dresden</City>
<Contact/>
<PhoneNo/>
<CustomerPostingGroup>CUB</CustomerPostingGroup>
<PaymentTermsCode/>
<CountryRegionCode>A</CountryRegionCode>
<BillToCustomerNo>12345</<BillToCustomerNo> (If empty i need to fill NO. generated in NAV automatically)
<FaxNo/>
<GenBusPostingGroup>NL</GenBusPostingGroup>
<PostCode>01001</PostCode>
<VATBusPostingGroup>NL</VATBusPostingGroup>
</Customer_Master>
</Customer>
If the BILLTOID has values it will import the values in the XML port but what is required is when the BillToID is empty i need to write a condition that it should take the customers no which is generated when the file is imported.
i tried to add code in the OnBeforeInsert() trigger in the xml port but still in vain.
pls suggest in which trigger can i check the condition and execute it.
Thanks in Advancr
0
Comments
-
The number won't be generated until AFTER the insert. So OnBeforeInsert won't work. Try OnAfterInsertRecord.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions