Hi,
Am working in dynamics ax 2009.I want to add records in Address table. Records are came from API. So how to insert records in Address Table?
*This post is locked for comments
What problem do you have with inserting records to the Address table? I assume you know who to fill field values and call the insert() method, don't you?
Hi Saravanaa,
When you want to insert records, you can use e.g. Application Integration Framework (AIF). There is a service available out if the box called AddressService.
Actually records are get from tmpTable. once i assigning the values for addressTable fields.after execution addressTable fields street,zipcode are automatically get different values. its not relating to my temporary table values.
while select tmptable
where tmptable.isCreated == NoYes:: Yes
{
custTable.AccountNum = tmpTable.ClientId;
custTable.FirstName = tmpTable.FirstName;
custTable.custGroupId = '100';
custTable.insert();
addressTable.AddrRecId = custTable.recId;
addressTable.AddrTableId = custTable.TableId;
addressTable.street = tmpTable.street;
addressTable.zipcode = tmpTable.zipcode;
addressTable.CountryregionId = tmpTable.RegionId;
addressTable.insert()
}
after executing this code addressTable fields are automatically different values. its not related to my tmpTable. so pls help me what mistake i did above code.
Now your question becomes clear to me. Note that there is logic executed when you call the insert method. Based on some setup or multiple values per Zipcode (same city) this logic can also change some of the fields you filled from your tmpTable. I can recall a problem in AX2009 but it has been over 5 years ago for me.
The executed logic tries to format the complete address in the address field. Probably try to find the culprit and get around this problem.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Community Member 4
NNaumenko 2
Aayyon Das 2