Import Address using AIF in AX 2012 R3

Hello,

i want to Import applicant with address through AIF.

i am follow below Link - But i got an error "“Document could not be created. Error details: Cannot create a record in Party postal address view (DirPartyPostalAddressView).Microsoft Dynamics views are read-only”.

Can U please help me…

Thanks

Darshana"

Your service doesn’t deal with addresses correctly. Try using DirPartyLocationServiceOp::handleDirPartyLocation() (you’ll find an example in AxdCustomer class).

Hello Martin,

Thanks for your reply…

Please can you elaborate the answer…

Thanks

Darshana

What isn’t clear to you? Have you already reviewed how it’s done in AxdCustomer, as I told you?

I am sorry Martin.

Actually i cant understand properly that’s why i am asking…

I’m saying that your service is wrong - it tries to write data to a view, which can’t work. You have to write additional code to fix the bug.

Then I told you which method to call and where you can find an example of its use (AxdCustomer class). If you open AxdCustomer.prepareForSaveExtended() and find the place where it handles DirPartyPostalAddressView, you’ll see a single line of code with the calI mentioned in my first reply. There is also a similar piece of code in prepareForDeleteExtended().

Hello Martin,

Thank you Very Much…

Address are imported succesfully

Thanks

Darshana

Great. So please mark the question as answered.