Advertisement
martyychang

TransactionSiteController

Feb 5th, 2014
1,290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.05 KB | None | 0 0
  1. /*
  2.  * Controller supporting the TransactionRecordTypeDemo page that demonstrates
  3.  * how to allow a user to select a Transaction record type from a dynamically
  4.  * generated list.
  5.  *
  6.  * @version 0.2
  7.  * @see     https://developer.salesforce.com/forums/ForumsMain?id=906F00000009F1M
  8.  * @author  Marty Chang (Slalom Consulting)
  9.  */
  10. public class TransactionSiteController {
  11.  
  12.     /*
  13.      * A Transaction record template to facilitate Salesforce-native user input.
  14.      */
  15.     public Transaction__c proxy { get; set; }
  16.  
  17.     /*
  18.      * Default constructor that initializes member variables
  19.      */
  20.     public TransactionSiteController() {
  21.         proxy = new Transaction__c();
  22.     }
  23.    
  24.     /*
  25.      * @return The custom edit page for Transactions, with the specified
  26.      *         record type ID
  27.      */
  28.     public PageReference editWithRecordType() {
  29.         PageReference nextPage = Page.EditTransaction;
  30.         nextPage.getParameters().put('RecordType', proxy.RecordTypeId);
  31.         return nextPage;
  32.     }
  33. }   // public class TransactionSiteController
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement