
Hello,
We want to make an API page to get Location related information on Transfer Header so we have a Location Page called "APIV2 - Location" and we add the relation to ZeroOrOne on the TransferHeader page like this:
part(transferFromLocation; "APIV2 - Location")
{
Caption = 'Transfer From Location';
EntityName = 'location';
Multiplicity = ZeroOrOne;
SubPageLink = Code = Field("Transfer-from Code");
}
part(transferToLocation; "APIV2 - Location")
{
Caption = 'Transfer To Location';
EntityName = 'location';
Multiplicity = ZeroOrOne;
SubPageLink = Code = Field("Transfer-to Code");
}
part(inTransitLocation; "APIV2 - Location")
{
Caption = 'In Transit Location';
EntityName = 'location';
Multiplicity = ZeroOrOne;
SubPageLink = Code = Field("In-Transit Code");
}
This code can be packaged but the metadata shows error 500:
{
"error": {
"code": "BadRequest_InvalidArgument",
"message": "An incompatible property definition already exists for transferHeader.location."
}
}
If we try to change the EntityName then the AL COP shows the error: