Add contact information for entity


How you can add contact information data to an existing entry in the global address book.

static void createPartyContactInfo(Args _args)
{
DirPartyTable dirPartyTable = DirPartyTable::findByNum(‪‪”100000″);
DirParty dirParty;
DirPartyContactInfoView dirPartyContactInfoView;

// Edit Global address book
dirParty = DirParty::constructFromCommon(dirPartyTable, DirUtility::getCurrentDateTime(), DirPartyType::Organization);

// Create contact info
dirPartyContactInfoView.LocationName =’Office’;
dirPartyContactInfoView.Locator =’+43 1 4654646′;
dirPartyContactInfoView.Type = LogisticsElectronicAddressMethodType::Phone;
dirPartyContactInfoView.IsPrimary = NoYes::Yes;

dirParty.createOrUpdateContactInfo(dirPartyContactInfoView);

}