I have to set the InventLocation Address by code. By code I know how to find the InventLocation address, but if it isn't there I want to create it.
My code is this :
InventLocation invLocationTable;
LogisticsPostalAddress logisticsPostalAddress;
invLocationTable = InventLocation::find(MYinvLocationId);
logisticsPostalAddress = LogisticsLocationEntity::findPostalAddress(invLocationTable, LogisticsLocationRoleType::None);
if (!logisticsPostalAddress )
{
// Here I want to create/set the InventLocation adress, but I don't know how to do it.
}
Is it possible to create it?