Showing results for 
Search instead for 
Do you mean 

Showing Opportunity Products on an Account tab

by on ‎02-14-2011 07:09 AM

The POC goal is to pull all products for all of an Account's Opportunities and show them in a grid under the Accounts page.


Step 1 - Create "GetProducts" GetBy method

  • Business Rule Method (C#) added to Account entity
  • Name: GetProducts
  • Return type : System.Collections.Generic.IList<Sage.Entity.Interfaces.IOpportunityProduct>
  • Primary Step
  • Method Name: GetProductsStep


Note, the return type of the method is a list of Opportunity Product.  This allows us to use a standard grid and edit form on the page


public static void GetProductsStep(IAccount account, out System.Collections.Generic.IList<Sage.Entity.Interfaces.IOpportunityProduct> result)


result = new System.Collections.Generic.List<Sage.Entity.Interfaces.IOpportunityProduct>();

foreach (IOpportunity o in account.Opportunities)


foreach (IOpportunityProduct p in o.Products)







Step 2 - Create a Grid form on the Account Entity

  • Entity Type = Opportunity Product
  • Get By Property = GetProducts
  • Source = Account
  • Add desired columns to grid


Step 3 - Save changes, Build and Deploy


Sage Developers Notes-

"In a production environment, I’d use a repository query rather than taking on the overhead of lopping thru all the opps, but this works just fine for a POC."



Register Read Guidelines Request Partner or Employee Access

What's New in 8.1