You need to sign in to do that
Don't have an account?
salesforce sfdx
Hi Team, can any one help me to resolve the lightning Flow
Requirement using a Flow: but flow is not Working.
UseCase:
When the lead record is converted.
lead record details are to be updated in the account object.
created a same fields in both objects but when we run the flow it was showing Error.
Result
Failed to update records that meet the filter criteria.
Error Occurred:
This error occurred when the flow tried to update records: SELECT Id FROM Account WHERE ((Id = ' 0012h00000oEq2cAAC')) LIMIT ^ ERROR at Row:1:Column:32 invalid ID field: 0012h00000oEq2cAAC. You can look up ExceptionCode values in the SOAP API Developer Guide.
Please suggest a better way to handle it ,
thanks
sfdx
UseCase:
When the lead record is converted.
lead record details are to be updated in the account object.
created a same fields in both objects but when we run the flow it was showing Error.
Result
Failed to update records that meet the filter criteria.
Error Occurred:
This error occurred when the flow tried to update records: SELECT Id FROM Account WHERE ((Id = ' 0012h00000oEq2cAAC')) LIMIT ^ ERROR at Row:1:Column:32 invalid ID field: 0012h00000oEq2cAAC. You can look up ExceptionCode values in the SOAP API Developer Guide.
Flow Steps : Step 1: Start a.Created a Record -Triggered Flow on lead b.A record is Created or Update c.optimize for: Actions and Related Records. Step 2: Decision a)Yes b)All conditions met c)Conditon: {!$Record.IsConverted} Equals {!$GlobalConstant.True} Step 3: update the lead data on the convertedAccountid Record. a)Specify conditions to identify records, and set fields individually b)Object: Account. c)All conditions met. d)Conditon: Id Equals {!$Record.ConvertedAccountId} e)Set Field Values for the Account Records Manufacturer__c <-- {!$Record.Manufacturer__c} Step 4:End. Note: Manufacturer__c is a custom field in the salesforce.
Please suggest a better way to handle it ,
thanks
sfdx
This is expected behaviour of salesforce.Please find the below lines from the article (https://help.salesforce.com/s/articleView?id=sf.leads_notes.htm&type=5) mentioned.
I hope this answers your question.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
As we have standard lead mapping where we can map the custom lead field with the Account or Contact or opportunity fields. I hope the flow is not at all required in this scenerio.
Please find the below article for the same
https://help.salesforce.com/s/articleView?id=sf.customize_mapleads.htm&type=5 (https://help.salesforce.com/s/articleView?id=sf.customize_mapleads.htm&type=5)
If this solution helps, Please mark it as best answer.
Thanks,
i had tried with the standard mapping conditions but it was not working , Do you have any idea to debug that issue.
as it was not working so started working with flow to acheive the issue.
Can u please let me know any better solution to debugging the mapping values is mapped or not.
Thanks
Sfdx
You can check if it is mapped or not like below.
Go to Setup-> ObjectManager-> Lead->Field and Relationship-> Map Lead Fields button
Let me know if you need any details.
Thanks,
In lead the customfield Manufacturer__c is a picklist value.
In Account the customfield Manufacturer__c is a Global Value Set of CGM_Manufacturer ,
Restrict picklist to the values defined in the value set is set as "True" be default for above Account manufactorer picklist value,
if using the Gobal value set picklist in account , will it throw an error
Other Test Approach From Developer console:
Error in Developer Console:
System.DmlException: Update failed. First exception on row 0 with id 0018I000009MwsDQAS; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, bad value for restricted picklist field: Nexon: [Manufacturer__c]
Did you check if Nexon value is present in GlobalValueset which is used and is the spelling same?
Thanks,
Yes i have checked it was the same.
let me Explain the Issue iam facing.
1)Lead>Manufacturer__c is a picklist value
2)Account >Manufacturer__c> is a Global picklist Value set.
Global picklist Value set contains [Nexon,Dexon]
When i convert an lead and Ex: it has Manufacturer__c ='Nexon'
a) if the account object Manufacturer__c is Empty or null it was updating and Working fine as expected..
b)if the account has any field value like:
account>Manufacturer__c ='Dexon' ,then it was not updating to 'Nexon'.
Note: if the accout field value is empty , standard functionality is working fine as expected
when account filed has any default value, it was not replacing it.
Stucked in it.
Thanks
This is expected behaviour of salesforce.Please find the below lines from the article (https://help.salesforce.com/s/articleView?id=sf.leads_notes.htm&type=5) mentioned.
I hope this answers your question.
If this solution helps, Please mark it as best answer.
Thanks,
Thanks
sfdx
Yes Can you try the below trigger on lead object and it will update it.
If this solution helps, Please mark it as best answer.
Thanks,
Thanks for your info.Thanks