opp = this.BindingSource.Current as
opp.Renew = "No";
Approach 2 – Best Practice
We will add
most of the Renewal code to a custom Opportunity Business Rule and then call
the Business Rule during the “Renew” button’s On Click Action as a C# Snippet
Action Item (Obsolete). By adding the
code to a business rule we will be able to call it from other places if needed.
Step 1 – Under Opportunity Add Custom Business Rule
public static partial class
public static void
RenewRuleStep(IOpportunity opportunity, out string result)
//Run this if
Renew button on Opportunity A is selected.
a new Opportunity B that includes some information from Opportunity A
an activity and add it to Opportunity B