Skip to content

Instantly share code, notes, and snippets.

@dhaniksahni
Created June 7, 2020 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhaniksahni/4538ecb9927faee817157b5a2217e9c8 to your computer and use it in GitHub Desktop.
Save dhaniksahni/4538ecb9927faee817157b5a2217e9c8 to your computer and use it in GitHub Desktop.
salesforcecodex plugin
public with sharing class {{objectName}} {
//save record
public void save{{objectName}}(string name) {
try
{
{{objectName}}Selector objRecord=new {{objectName}}Selector();
{{objectName}} record=objRecord.getByName(name);
if(record!=null)
{
//do whatever you want do
}
}
catch (BaseException ex) {
ApplicationException.LogException(ex);
}
catch (Exception ex) {
ApplicationException.LogException(ex);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment