+ Start a Discussion
Craig WoodmanCraig Woodman 

Flow Error - Argument must be a big decimal java.lang.Long - On saving an Sobject Collection Variable

Hello,

Received an odd error when executing a flow. I was using the "Get Records" element, storing all fields in Salesforce, with the Opportunity Product object. My flow changes the value of the records in a couple of ways, and then writes the value of the changed records back into the database with an update records action.

Note: As part of the processing, the collection from the get records element is assigned to another Sobject variable. That Sobject variable is what gets written back.

The flow worked fine in testing. We put it in production today, and it worked fine with many updates today, until we came to one particular Opportunity. The flow failed with the error mentioned in the title.

All of the fields for this record were not populated with anything odd.

I was updating the records with a Map Collection invokable Apex action. Thinking this must be the trouble, I modified the flow to use a loop, figuring I would deal with governor limits later. I removed all of the invokable Apex. I tested. The same error.

Digging in a bit further, I found that the Fast Update was referencing what looks like all of the fields in the Opportunity Line Item object. In the past, it looks like these reference only the records that are used in the flow. So I thought... Why not use the Lookup element and only assign the fields I need into an Sobject collection variable.

So I did. I also kept running all of the invokable apex. And the flow executed as intended.

I dont' know if this is a problem with the store all records piece of the flow, but I wanted to post here and see what anyone thought. If nothing more, a search I made for this error turned up nothing with flow, so I figure someone might search and find it.

Curious to hear anyone else's thoguhts.
AnudeepAnudeep (Salesforce Developers) 
Seen this issue reported to Salesforce Support once. However, there was a lightning component associated to the flow in that case and the suggested workaround that helped was to create a new collection instead of using a collection getting from the lightning component.

(122648965)|FLOW_VALUE_ASSIGNMENT|2012f98e5083320047202b2d871a16fd62616d6-1eca|error.type|FLOW_INTERVIEW_HANDLED_ERROR
23:57:15.0 (122658527)|FLOW_VALUE_ASSIGNMENT|2012f98e5083320047202b2d871a16fd62616d6-1eca|error.message|This error occurred when the flow tried to update records: Argument must be a big decimal java.lang.Long. You can look up ExceptionCode values in the <a href='https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm#'>SOAP API Developer Guide</a>.
23:57:15.0 (124101164)|FLOW_ELEMENT_ERROR|This error occurred when the flow tried to update records: Argument must be a big decimal java.lang.Long. You can look up ExceptionCode values in the <a href='https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm#'>SOAP API Developer Guide</a>.|FlowScreen|DatatableScreen

I suggest reaching out to support once

Anudeep