I am new bids for ax2012. i having some problem of Use CSV file to load Vend/Cust Contact as below coding. Vendor & cust address is exist.
Cust A, Fax no: 6738433
Cust B, Fax no: 8787223
Cust A, Fax no: 6738433 & Fax no: 8787223
Cust B, -
All fax no is create under custA Party, which is very weird.
There is some problem when code execute at
I am doubting if some thing is missing at dirParty.createOrUpdateContactInfo(contactView)???
Please correct me if there is wrong in below code.
vendTable = VendTable::find(conPeek(readCon,1));
partyRecId = vendTable.Party;
addressView.Party = partyRecId;
dirParty = dirParty::constructFromPartyRecId(addressView.Party);
contactView.Locator = strLRTrim(conPeek(readCon,2));
contactView.Party = partyRecId;
contactView.Type = LogisticsElectronicAddressmethodType::Fax;
contactView.IsPrimary = NoYes::Yes;
contactView.LocationName = "Fax" ;
Try clear the contactView buffer before each insert.
i.e.contactView.clear(); // Add this linecontactView.Locator = strLRTrim(conPeek(readCon,2));contactView.Party = partyRecId;...
When you call dirParty.createOrUpdateContactInfo(), it will update some fields in contactView, clearing the buffer first should solve your problem.
My blog | PBC
This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
Thanks a lot for help. It work fine now..:D.