import AP.Common.GDT;
import AP.FO.BusinessPartner.Global;
import AP.CRM.Global;
var AccountID: PartyID;
var AccountIDs: collectionof PartyID;
var CRMDocumentType: BusinessTransactionDocumentTypeCode;
/*Multiple account IDs can be passed to the API. Number of account IDs passed is subject to system performance.
It is suggested to pass an optimal number of account IDs.*/
// Account ID or Buyer ID
AccountID.content = "MC9785";
AccountIDs.Add(AccountID);
/* CRMDocumentType Sample values: 114 Sales Order, 117 Service Order, 118 Service Request,
30 Sales Quote/Quote for Contract, 1092 Contract, 32 Customer Return*/
// For Sales Order CRM document, CRMDocumentType optional parameter is set to 114 by default.
CRMDocumentType = "114"; //Sales Order
// Input is always Account/Buyer IDs
var DeterminedParties = CustomerRelationshipManagmentUtilities.CRMDocumentPartyDeterminationV1(AccountIDs,CRMDocumentType);
if (DeterminedParties.FailedIndicator == false)
{
foreach(var DeterminedParty in DeterminedParties.CRMDocumentDeterminedParty)
{
// Given Account/Buyer ID
var ForGivenAccount = DeterminedParty.AccountID.content;
// Determined Party ID
var DeterminedPartyID = DeterminedParty.Party.PartyID.content;
// Determined Party UUID
var DeterminedPartyUUID = DeterminedParty.PartyUUID.content;
// Party Type (Role Code determines the Party type. Examples:Sales Unit Party )
var PartyRoleCode = DeterminedParty.RoleCode;
/* Sample Party Role Codes are listed below (Standard and Partner Defined Parties).
Account/Buyer Party : 1001
Bill-To Party : 8
Ship-To Party : 1005
Payer Party : 10
Sales Unit Party : 44
Seller Party : 2
Invoicing Unit Party : 1101
Employee Responsible : 39
Service Execution Team : 42
Service Performer Party : 43
Sales Partner Party : 29
Sales Employee Party : 46
Freight Forwarder Party : 47
ZParty with ZRole Code : Partner Defined Role Code*/
}
}
else
{
// Error occurred. This could be due to invalid account ID passed to API or invalid document type or technical error.
}
/* Sales Order: Sample Party Role Codes are listed below (Standard and Partner Defined Parties for CRMDocumentType = "114"; //Sales Order)
Account/Buyer Party : 1001
Bill-To Party : 10
Ship-To Party : 1005
Payer Party : 8
Sales Unit Party : 44
Seller Party : 2
Invoicing Unit Party : 1101
Employee Responsible : 39
Service Execution Team : 42
Service Performer Party : 43
Sales Partner Party : 29
Sales Employee Party : 46
Freight Forwarder Party : 47
ZParty with ZRole Code : Partner Defined Role Code
*/
/* Service Order: Sample Party Role Codes are listed below for CRMDocumentType = "117"; //Service Order
Account/Buyer Party : 1001
Bill-To Party : 10
Ship-To Party : 1005
Invoicing Unit Party : 1101
Seller Party : 2
Service and Support Team : 28
Processor Party : 40
Service Execution Team Party : 42
Service Performer Party : 43
Sales Unit Party : 44
Freight Forwarder Party : 47
Supplier Party : 6
Payer Party : 8
ZParty with ZRole Code : Partner Defined Role Code
*/
/* Service Request: Sample Party Role Codes are listed below for CRMDocumentType = "118"; //Service Request
Account/Buyer Party : 1001
Ship-To Party : 1005
Seller Party : 2
Service and Support Team : 28
Processor Party : 40
Sales Unit Party : 44
ZParty with ZRole Code : Partner Defined Role Code
*/
/* Sales Quote/Quote for Contract: Sample Party Role Codes are listed below for CRMDocumentType = "30"; //Customer Quote
Account/Buyer Party : 1001
Bill-To Party : 10
Ship-To Party : 1005
Seller Party : 2
Sales Partner Party : 29
Employee Responsible Party : 39
Sales Unit Party : 44
Sales Employee Party : 46
Freight Forwarder Party : 47
Payer Party : 8
ZParty with ZRole Code : Partner Defined Role Code
*/
/* Contract: Sample Party Role Codes are listed below for CRMDocumentType = "1092"; //Contract
Account /Buyer Party : 1001
Bill-To Party : 10
Ship-To Party : 1005
Invoicing Unit Party : 1101
Authorised Party : 1020
Contract Administrator Party : 1122
Seller Party : 2
Contracting Unit Party : 204
Sales Partner Party : 29
Employee Responsible Party : 39
Service Execution Team Party : 42
Service Performer Party : 43
Sales Unit Party : 44
Payer Party : 8
ZParty with ZRole Code : Partner Defined Role Code
*/
/* Customer Return: Sample Party Role Codes are listed below for CRMDocumentType = "32"; //Customer Return
Account/Buyer Party : 1001
Bill-To Party : 10
Ship-To Party : 1005
Invoicing Unit Party : 1101
Seller Party : 2
Service and Support Team : 28
Employee Responsible Party : 39
Processor Party : 40
Sales Unit Party : 44
Payer Party : 8
ZParty with ZRole Code : Partner Defined Role Code
*/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
7 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |