Created
June 7, 2020 14:12
-
-
Save dhaniksahni/4538ecb9927faee817157b5a2217e9c8 to your computer and use it in GitHub Desktop.
salesforcecodex plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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