Importing Address For Prospects through Excel


I am working on Ax 2012 R2

I have addresses data for all prospects in Excel.

Now I want to import the address by job, I have written below code import

select Busrel where Busrel.BusRelAccount == busrelacnt;

dirParty = DirParty::constructFromCommon(Busrel);

dirPartyPostalAddressView.LocationName = orgName;
dirPartyPostalAddressView.City = city;
dirPartyPostalAddressView.Street = street;
dirPartyPostalAddressView.StreetNumber = “”;
dirPartyPostalAddressView.CountryRegionId = contryRegion;
dirPartyPostalAddressView.State = stateId;
dirPartyPostalAddressView.ZipCode = zipCode;

dirPartyPostalAddressView.Party = DirPartyTable.RecId;
dirPartyPostalAddressView.Address = address;

when I debug the job All the variable values coming from excel correctly but it is not creating address for prospect.

Please kindly assist if there is anything wrong in the job.

is that your complete code?

if so, you are not calling any code that triggers the creation of address. Example \Classes\DirParty\createOrUpdatePostalAddress