Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Controller supporting the TransactionRecordTypeDemo page that demonstrates
- * how to allow a user to select a Transaction record type from a dynamically
- * generated list.
- *
- * @version 0.2
- * @see https://developer.salesforce.com/forums/ForumsMain?id=906F00000009F1M
- * @author Marty Chang (Slalom Consulting)
- */
- public class TransactionSiteController {
- /*
- * A Transaction record template to facilitate Salesforce-native user input.
- */
- public Transaction__c proxy { get; set; }
- /*
- * Default constructor that initializes member variables
- */
- public TransactionSiteController() {
- proxy = new Transaction__c();
- }
- /*
- * @return The custom edit page for Transactions, with the specified
- * record type ID
- */
- public PageReference editWithRecordType() {
- PageReference nextPage = Page.EditTransaction;
- nextPage.getParameters().put('RecordType', proxy.RecordTypeId);
- return nextPage;
- }
- } // public class TransactionSiteController
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement