2022
Issue: Insertion of Invoice to Opportunity is done based on QuickBooksID (AVSFQB__Quickbooks_Id__c).
...
Fig1: Mapping
Fig2: Logs
Solution:
...
Open Invoice to Opportunity workflow.
...
Open first rule and replace existing mapping for AccountID as shown below:
Fig3: Updated mapping
Existing mapping:
...
For Invoices to sync based on particular customer type do the following changes:
Go to the workflow :” Invoices to Opportunity”
1st Rule: SF UPSERT AVSFQB_INVOICE__C
VALIDATE ROW : IF(ISEMPTY(VALUE("OpportunityId")),IF(VALUE("CustomerRef/FullName/CustomerRet/CustomerTypeRef/FullName").equals("Retail"),"true","false"),"false")
Here “Retail” is the customer type we can change according to our requirement.
2ND RULE: SF UPDATE OPPORTUNITY
VALIDATE ROW: IF(VALUE("OpportunityId")!="",IF(VALUE("CustomerRef/FullName/CustomerRet/
...
CustomerTypeRef/FullName").equals("Retail"),"
...
true","false")
...
Updated mapping:
...
,"false")
Here “Retail” is the customer type we can change according to our requirement.
3rd RULE:SF UPSERT OPPORTUNITYLINEITEM
VALIDATE ROW:
IF(ISEMPTY(VALUE("OpportunityId")),IF(VALUE("CustomerRef/FullName/CustomerRet/CustomerTypeRef/FullName").equals("Retail"),"true","false"),"false")
Here “Retail” is the customer type we can change according to our requirement.
VALIDATE ROW:
IF(ISEMPTY(VALUE("OpportunityId")),IF(VALUE("CustomerRef/FullName/CustomerRet/NameCustomerTypeRef/FullName").equals("Retail"),"Opportunitytrue","false"),"false")
Here “Retail” is the customer type we can change according to our requirement.
Now invoices will sync of customer type “Retail”