Update Party Contacts - Code: UPD PARTY CONTACTS
General
This page contains the JSON of the function-set Code: UPD PARTY CONTACTS
This function reloads the Contact lines in the Fact Box: Parties for a document party header. It removes the existing Contacts attached to the header, and then adds new ones for each WMS Party Type in the PARTYTYPEFILTER parameter.
The function looks up the Document Party header of type Party that isn't attached to a line, and that matches either the PARTYTYPECODE or the PARTYTYPEVALUE parameter. It processes every header that matches. Supported source tables are WMS Document Header, TMS Document Header and WMS Quality Header; any other source table results in an error.
Note
This function never creates or changes a document party header. With PARTYTYPEVALUE, a blank Party Code on the header is filled from the document field only in memory — it isn't saved as a new header.
| Parameter | Description |
|---|---|
PARTYTYPECODE |
The party type of the header, for example CUSTOMER. Set either this parameter or PARTYTYPEVALUE, not both. |
PARTYTYPEVALUE |
The field number on the source header that holds the party type, for example the field Sell-to Customer No.. Set either this parameter or PARTYTYPECODE, not both. |
PARTYTYPEFILTER |
A filter on the contact party type codes to reload, using standard filter syntax, for example ORDER*\|PIF. Leave empty to reload the contacts for all party types. |
ERROR IF MISSING |
When True (the default), the function stops with an error if no matching document party header is found. Set to False to exit silently instead. |
Json code snippet: Update Party Contacts
{
"FunctionSet": {
"TableNo": 11172786,
"DataType": "34047",
"Entries": [
{
"EntryNo": "10000",
"CodeunitID": "72270061",
"FunctionCode": "UPD PARTY CONTACTS",
"Description": "Update Party Contacts",
"Parameters": [
{
"ParameterName": "PARTYTYPECODE",
"Value": "CUSTOMER"
},
{
"ParameterName": "PARTYTYPEFILTER",
"Value": "ORDERCONFIRMATION"
}
]
}
]
}
}