Community
Showing results for 
Search instead for 
Do you mean 
Reply

Totalling Opportunities

Accepted Solution Solved
Bronze Elite Contributor
Posts: 1,410
Country: United_Kingdom
Accepted Solution

Totalling Opportunities

When looking at a company the opportunity tab will give a total of all listed opportunities.  Is there any way of capturing this information and putting in a field in the associated company table? 


Accepted Solutions
Solution
Accepted by topic author ch1p
‎03-12-2016 01:42 AM
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Totalling Opportunities

Using the ACT SDK use somthing like this...

 

// Sudo code

Dim opportunityList as Act.Framework.Opportunities.OpportunityList = nothing

opportunityList = Me.HostFramework.Opportunities.GetOpportunitiesByCompany(Me.HostApplication.ApplicationState.CurrentCompany.ID, Nothing, aFilter)

 

Dim total as decimal = 0D

 

  For Each opp As Act.Framework.Opportunities.Opportunity In opportunityList
total += opp.ProductTotal
Next

 

 

Hope this helps

-- Jim Durkin

 

 

 

 

View solution in original post


All Replies
Solution
Accepted by topic author ch1p
‎03-12-2016 01:42 AM
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Totalling Opportunities

Using the ACT SDK use somthing like this...

 

// Sudo code

Dim opportunityList as Act.Framework.Opportunities.OpportunityList = nothing

opportunityList = Me.HostFramework.Opportunities.GetOpportunitiesByCompany(Me.HostApplication.ApplicationState.CurrentCompany.ID, Nothing, aFilter)

 

Dim total as decimal = 0D

 

  For Each opp As Act.Framework.Opportunities.Opportunity In opportunityList
total += opp.ProductTotal
Next

 

 

Hope this helps

-- Jim Durkin

 

 

 

 

Bronze Elite Contributor
Posts: 1,410
Country: United_Kingdom

Re: Totalling Opportunities

Tanks Jim,

 

Will try and put something together with this in it,