You need to sign in to do that
Don't have an account?
Sameer Vits
update specific field under contact if contact already exists
I have a trigger autoconverting leads into Contact when someone submits the web to lead form. I want to update 'session' field under Contact, if Contact (converted lead) already exists. If we can check this using email address. I am new with Apex and need help with writing the code.
Your code will look something like this:
Let me know if it helps.
Thanks!
All Answers
I understand your requirement. You need to query contact object using that email. If the query returns any result, that contact field can be updated. And no conversion will occur.
May be you can post your code here, so accordingly we can see what modifications are needed.
Thanks.
Your code will look something like this: Please note that code can vary depending upon your trigger.
I might be able to help you better if you could please share your trigger code.
Thanks!
Requirements that we are trying to work on now is:
1) if email exists, then update contact session field
2) if email doesn't exits, then create new record
Your code will look something like this:
Let me know if it helps.
Thanks!
So it depends on what date they select and that date value should be inserted into c.session__c
For that I suggest you pass that picklist field value a function parameter to your function from your caller.
Please mark this post as solved and ask your query in a new post..
Post the link of that post here.
Error element myRule_1_A1 (FlowActionCall).
An Apex error occurred: System.DmlException: ConvertLead failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, There was an error converting the lead.
I tested the Code, it is running fine. Can you please check what are you getting in 'LeadIds' using system.debug statements