Dynamics 365 FO - Upsert Customer Address x++
Nghia Song - Microsoft Dynamics 365 Technical Consultant
Nghia Song
Tel - WhatsApp: +84967324794
Email: songnghia.uit@gmail.com
private void createAddress(SIAddressParameter _address, SICustomerAddressParameter _custAddressParam, CustTable custTable) { dirPartyPostalAddressView dirPartyPostalAddressView; DirParty dirparty; dirParty = DirParty::constructFromCommon(custTable); dirPartyPostalAddressView.LocationName = _address.parmAddlocationName(); dirPartyPostalAddressView.City = _address.parmCity(); dirPartyPostalAddressView.Street = _address.parmStreet(); dirPartyPostalAddressView.CountryRegionId = _address.parmCountryId(); dirPartyPostalAddressView.State = _address.parmState(); dirPartyPostalAddressView.zipcode = _address.parmZipCode(); dirPartyPostalAddressView.IsPrimary = (_address.parmShipto())?NoYes::Yes:NoYes::No; dirPartyPostalAddressView.FSWithinCityLimits = (_address.parmWithinCity() == 'Yes')?NoYes::Yes:NoYes::No; dirPartyPostalAddressView.FSYearBuilt = _address.parmYearBuilt(); dirPartyPostalAddressView.FSLeadPaintStatusId = _address.parmLeadPaintStatusId(); dirPartyPostalAddressView.CHI_CRMAddressId = _address.parmCRMAddressId(); dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,str2con(_address.parmAddRoles())); } Thank for share: https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/409862/create-or-update-customer-address-through-code-x-in-d365-f-o
No comments:
Post a Comment