on 2017 Jan 09 8:00 AM
Add Party to Lead Error: Party inconsistent due to "Employee does not exist in master data" although it is there
Hello,
I have a problem when adding employees to the "sales & marketing team" of a Lead or "sales team" of an opportunity.
Usecase:
Based on some logic a subset of employees is determined from the Account-Team of the Lead-underlying account. These employees should all be added to the lead's "sales & marketing team".
Implementation(s):
We tried more or less the same in Lead and opportunity, therefore I'll only focus on the lead for now:
foreach(var oAccountEmployee in cAccountEmployees){
// ... retreive BP from Employee -> oBP
if(oBP.IsSet()){
var oSalesEmployeePartyValues :elementsof oLead.Party;
oSalesEmployeePartyValues.RoleCode = "ZSM";
oSalesEmployeePartyValues.PartyKey.PartyID.content = oBP.InternalID;
// third try: using Employee - ID
//oSalesEmployeePartyValues.PartyKey.PartyID.content = oAccountEmployee.EmployeeID.content;
oSalesEmployeePartyValues.PartyKey.PartyTypeCode = "167"; // 167 - Employee
oLead.SalesEmployeeParty.Create(oSalesEmployeePartyValues);
// second try: adding as "Party"
//oLead.Party.Create(oSalesEmployeePartyValues);
}
}
After getting the error, we tried different approaches marked as second try and third try above. But we always get below error messages.
Error:
Error: Please report an incident. Party instance is inconsistent.
Warning: Please enter another party ID. <RoleName> 8000000093 (<FirstName> <LastName>) does not exist in master data.
Issue:
Before our logic:
Lead.Party
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000000000318454
08:28:35 [1:I] Trace PartyTypeCode 159
08:28:35 [1:I] Trace RoleCategoryCode 31
08:28:35 [1:I] Trace RoleCode 31
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000032
08:28:35 [1:I] Trace PartyTypeCode 167
08:28:35 [1:I] Trace RoleCategoryCode 46
08:28:35 [1:I] Trace RoleCode ZSM
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000093
08:28:35 [1:I] Trace PartyTypeCode 167
08:28:35 [1:I] Trace RoleCategoryCode 46
08:28:35 [1:I] Trace RoleCode ZSR
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000003
08:28:35 [1:I] Trace PartyTypeCode 167
08:28:35 [1:I] Trace RoleCategoryCode 46
08:28:35 [1:I] Trace RoleCode 46
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000003
08:28:35 [1:I] Trace PartyTypeCode 167
08:28:35 [1:I] Trace RoleCategoryCode 39
08:28:35 [1:I] Trace RoleCode 39
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
Lead.SalesEmployeeParty
08:28:35 [1:I] Trace - S - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000032
08:28:35 [1:I] Trace PartyTypeCode 167
08:28:35 [1:I] Trace RoleCategoryCode 46
08:28:35 [1:I] Trace RoleCode ZSM
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace - S - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000093
08:28:35 [1:I] Trace PartyTypeCode 167
08:28:35 [1:I] Trace RoleCategoryCode 46
08:28:35 [1:I] Trace RoleCode ZSR
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace - S - - - - - - - - - - - - - - - - - - -
08:28:35 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000003
08:28:35 [1:I] Trace PartyTypeCode 167
08:28:35 [1:I] Trace RoleCategoryCode 46
08:28:35 [1:I] Trace RoleCode 46
08:28:35 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
after our logic:
Lead.Party
08:29:57 [1:I] Trace 2 - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000000000318454
08:29:57 [1:I] Trace PartyTypeCode 159
08:29:57 [1:I] Trace RoleCategoryCode 31
08:29:57 [1:I] Trace RoleCode 31
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace 2 - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000003
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 46
08:29:57 [1:I] Trace RoleCode 46
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace 2 - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000003
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 39
08:29:57 [1:I] Trace RoleCode 39
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace 2 - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000093
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 46
08:29:57 [1:I] Trace RoleCode ZSR
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace 2 - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000032
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 46
08:29:57 [1:I] Trace RoleCode ZSM
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace 2 - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000151
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 46
08:29:57 [1:I] Trace RoleCode ZSM
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace 2 - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000040
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 46
08:29:57 [1:I] Trace RoleCode ZSM
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
Lead.SalesEmployeeParty
08:29:57 [1:I] Trace 2 S - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000003
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 46
08:29:57 [1:I] Trace RoleCode 46
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace 2 S - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000093
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 46
08:29:57 [1:I] Trace RoleCode ZSR
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace 2 S - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000032
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 46
08:29:57 [1:I] Trace RoleCode ZSM
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace 2 S - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000151
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 46
08:29:57 [1:I] Trace RoleCode ZSM
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace 2 S - - - - - - - - - - - - - - - - - - -
08:29:57 [1:I] Trace PartyID 000000000000000000000000000000000000000000000000008000000040
08:29:57 [1:I] Trace PartyTypeCode 167
08:29:57 [1:I] Trace RoleCategoryCode 46
08:29:57 [1:I] Trace RoleCode ZSM
08:29:57 [1:I] Trace - - - - - - - - - - - - - - - - - - - - -
Do you see the bug in the coding or the error in the concept of this approach?
We did some similar implementation a year ago for an other customer and it worked without any problems. Have there been any changes since then?
By the way the messages are raised from Party node:
08:30:03 [1:E] Message (LEAD, PARTY) Please report an incident. Party instance is inconsistent.
08:30:03 [1:W] Message (LEAD, PARTY) Please enter another party ID. <RoleName> 8000000093 (<FirstName> <LastName>) does not exist in master data.
User | Count |
---|---|
82 | |
12 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.