Skip to content

Instantly share code, notes, and snippets.

@samuelsharaf
Last active August 29, 2015 14:04
Show Gist options
  • Save samuelsharaf/38a975460b3e6318ee1d to your computer and use it in GitHub Desktop.
Save samuelsharaf/38a975460b3e6318ee1d to your computer and use it in GitHub Desktop.
Z4SF-IPopulatePlugin Example
global class DefaultValues extends zqu.CreateQuoteController.PopulateDefaultFieldValuePlugin{
global override void populateDefaultFieldValue
(SObject record, zqu.PropertyComponentController.ParentController pcc)
{
super.populateDefaultFieldValue(record, pcc);
record.put('zqu__InitialTerm__c', 12);
record.put('zqu__RenewalTerm__c', 12);
record.put('zqu__ValidUntil__c', Date.today().addDays(30));
record.put('zqu__StartDate__c', Date.today());
record.put('zqu__PaymentMethod__c', 'Credit Card');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment