Created
August 15, 2012 00:16
-
-
Save mailtoharshit/3354149 to your computer and use it in GitHub Desktop.
How to use the method
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
pageParams = ApexPages.CurrentPage().getParameters(); | |
string theId; | |
if (pageParams.containsKey('id')) { | |
theId = pageParams.get('id'); | |
} else { | |
return null; | |
} | |
//now go look up the account using getObject method | |
Account toClone = (Account) DataUtils.getObject('Account', theId); | |
insert toClone; | |
//inserted the clone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment