These docs are for v20.3.44. Click to read the latest docs for v20.3.186.

Discussions

Ask a Question
Back to All

How do I create an organization record with a parent ID

Hi,

I'm trying to use the Party endpoint to create a new Organization record in iMIS such that it is a branch of a a parent org record. Think Versaton Europe in the started db being a child of Versaton Global Headquarters.

{
$type: "Asi.Soa.Membership.DataContracts.OrganizationData, Asi.Contracts",
OrganizationName: "Versaton Europe 2",
Name: "Versaton Europe 2",
Sort: "Versaton Europe 2",
AdditionalAttributes: {
$type:
"Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
$values: [
{
$type:
"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
Name: "CustomerTypeCode",
Value: "C",
},
{
$type: "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
Name: "ParentPartyId",
Value: "23087",
}
],
},
Status: {
$type: "Asi.Soa.Membership.DataContracts.PartyStatusData, Asi.Contracts",
PartyStatusId: "A",
},
}

It does successfully create the new record as a child of Versaton Global Headquarters, but it seems the name of the new child org gets overwritten to "Versaton Global Headquarters" instead of the "Versaton Europe 2" that provided - I imagine this is related to company flowdown, turning off the option for address to flow down does not prevent this.

I also noticed the same thing happens when adding a ParentPartyId to an existing organisation contact via the Party endpoint.

What is the correct way to create a child org using the REST API such that the name is not overwritten?

Thanks,

Martin