function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AbAb 

The flow tried to update these records: null. This error occurred: MALFORMED_ID:

Hello,

I have object like below
 
Account
  CustField1__c [Lookup to object CustObj1__c]

CustObj1__c
  Name [Text] Standard field
  CustomField2__c [Text]

I populated the name of the EEF, if it it present on Account.
If( CustomField2__c  == 'EEF')
  Then On Account CustField1__c = "Name of EEF"
I have used a combination of Flow and process builder for that.

Everythuing works well but I have catched the exception and i get below error
An error has occurred on the flow :
The flow tried to update these records: null. This error occurred: MALFORMED_ID: CustomField2__c () : id value of incorrect type: SomeValue. For details, see <a href='https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm#'>API Exceptions</a>.
I wonder how to correct this error.






 
Best Answer chosen by Ab
Anurag SaxenaAnurag Saxena
Basically, you have to write something like this

Account CustField1__c = object.id

not specific Record ID

Here is my skype ID -anurag.twopirconsutling
ping me if it  this doesn't solve the issue

will do screen sharing to solve the issue:)

Thanks

All Answers

Anurag SaxenaAnurag Saxena

Hi Sandrine,

Reason for this error:

You are giving the string value in the lookup field instead of Record ID.

Solution:

You have to give the ID of record instead of a string.

For Example 
Account CustField1__c  is the lookup field

Account CustField1__c = "Name of EEF"  (Not Correct)

Account CustField1__c = record.id  (Correct)

Hope it will help you :)

Let me know what happens once you have made the changes

Thanks

AbAb
How can i get the "record.id " for an object.
for the Object the "Name" is the required field and not the autonumber.
The object doesnit have any record type either
Anurag SaxenaAnurag Saxena
Basically, you have to write something like this

Account CustField1__c = object.id

not specific Record ID

Here is my skype ID -anurag.twopirconsutling
ping me if it  this doesn't solve the issue

will do screen sharing to solve the issue:)

Thanks
This was selected as the best answer
Anurag SaxenaAnurag Saxena
Hi Sandrine,

hope your issue is resolved 

please choose as best answer:)

Thanks