2022

Page tree
Skip to end of metadata
Go to start of metadata

Issue: Suppose there is a custom field in QB as “Closer” this is mapped to ownerId in Salesforce and If the user is inactive in Salesforce, then we can not update or insert any records with that ownerId.

Solution: Either in Salesforce they need to make that user as active or need to change the ownerId to a different user and need to provide respective value in  Custom field here it is “Closer” Or with the alternate user Id we can update in the mappings, so as to it will update on the active User whenever the select value of the user is inactive in Quickbooks.

Earlier mapping:

OwnerID

So this will throw an error as “Operation performed on the record owner is inactive”


Updated mappings:

OwnerIDUpdated

Need to change it in both upsert and update Rules

{
String strUser=VALUE("DataExtRet[DataExtName[1]/text()='Closer']/DataExtValue");
LOG("USer name : "+strUser);
String str=TLOOKUP("Select Id FROM User where QB_ID__c='"+strUser+"' and IsActive=true");
LOG("User SF ID : "+str);
if(str.length()>0)
{
return str;
}
String strId="00532000004NvAyAAK";
return strId;
}

This will update the inactive user selected in the QB custom field to the above-mentioned UserId.





  • No labels