I am having some trouble with a "record update" associated with a flow that I have just created. My flow "works" properly - without throwing any errors. Here is what I am working with:
- I have created the custom object Expense__c that I will use to log invoicese from my vendors
- the Vendors are listed in my Vendor__c object
- On my Expense__c records, I have the following fields:
SystemID (Text field, External ID)
Order_Date (Formula, Date)
Cost (Currency field)
- I also have the custom object Transaction__c. Transaction__c records are created via XML posts from another system. For this use case, key fields on Transaction__c are:
SystemID (Text, External ID)
Order_Date (Formula, Date)
Cost (Currency field)
Here is what my Flow does:
From my Vendor__c record, the flow gives the user an input screen where expense details are enetered, upon NEXT a new Expense__c record is created with the field values that were set in the Input screen.
This part is working properly.
Next, the flow will preform a RECORD LOOKUP and locate the Expense__c record that was just created, and set the SystemID as the sObject variable SysID, the Order_Date as the variable OrdDate, and the Cost as the variable ExCost.
The flow will the preform another RECORD LOOKIP on the Transaction__c object with the following criteria:
Field: Transaction__c.SystemID EQUALS Variable: SysID
AND
Field: Transaction__c.Order_Date EQUALS Variable: OrdDate
Matcing record IDs are assigned to the variable TransUpdateID
Lastly, my flow preforms a RECORD UPDATE as follows:
UPDATE Transaction__c that meet the following criteria:
Field: Id EQUALS Variable: TransUpdateID
Update Transaction__c field Cost with the value of variable ExCost
When I go and look at a Transaction__c record that should have been updated, cost is still null - and I am having trouble figuring out where my process is breaking down. Here are some questions that I have:
- Could the fact that I am using formula generated date fields as a search field and comparitor be an issue?
- I am trying to update multiple Transaction__c records with one action, do I need to structure my flow differently to handle multiple records?
Thank you very much in advance for your help - and for reading through all of this!
John
3 answers
Also, if you are using RecordIUpdate instead of FastUpdate, make sure you have mapped Flow variables to the fields of the sObject being updated. With a FastUpdate, any fields that have a value in the sObject are updated; with a RecordUpdate, you have to specify which fields you want to update.