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
SZourasSZouras 

Newbie to dev

Hey guys,
I've searched but haven't seen this exact scenario, so perhaps I'm wording it wrong, but here goes on the explanation, in hopes to get some guidance. 

Scenario, in point form:
  • I have a custom object = Sessions
  • I need to relate Sessions to the standard object, Accounts, using the Account Name
  • I have two fields on Sessions to accomplish = Account Name (lookup to the Account standard object), and = Account Name Submitted
  • Sessions entries are submitted via webform, so I am using a custom field to capture the Account name = Account Name Submitted
  • The idea is that the Account Name Submitted is what the user submits, and what I want to do is have a trigger or process that looks up the Account Name Submitted, determine if there is a match to an Account Name in the system, and if so, update the Account Name lookup field on the custom Sessions object to created the association
Any guidance is appreciated - do I have to write code/trigger for this? can I use Process Builder or Flows? Other options? I thought this might be a common scenario, but perhaps I'm not searching using the correct salesforce vocabulary.

Thanks for any guidance!
Sujit Anil NirkheSujit Anil Nirkhe

SZouras,

You are thinking the correct way.

You can accomplish this with the help of triggeres, and I guess it is easiest way to do this.

SZourasSZouras
Is there any example code, how-to's, etc, out there to get me started on the right track? Not sure where to begin as the search results I've tried aren't turning up much, nor is trailhead giving this kind of example - again, perhaps I'm searching based on the wrong terminology? Would love to take a look through and learn this, while solving my problem, but not getting anywhere so far. Any tips or pointers to useful articles, code, etc would be much appreciated