Community
Showing results for 
Search instead for 
Do you mean 
Reply

Refreshing opportunity detail view

Tuned Listener
Posts: 16
Country: Belgium

Refreshing opportunity detail view

Hi everyone,

 

I'm coding a very simple plugin who has to sum a custom fied from products and put the result in another custom field in the opportunity (like the "opportunity total does" with the total of each product)

It's working perfectly but I need to hit F5 to see the sum in the opportunity custom field. Is there a way to catch the closing event from the "add/edit product" window ?

 

TIA

 

Stephen

Employee
Posts: 1,163
Country: USA

Re: Refreshing opportunity detail view

There's not an event for montiroing that form closing, however calling the update method for the current opportunity ought to show the changes.

 

If for some reason it isn't, you can also refresh the view you're in:

 

ActApp.CurrentView.RefreshView();

Matthew Wood
Act! SDK Support
Community Moderator
Tuned Listener
Posts: 16
Country: Belgium

Re: Refreshing opportunity detail view

Hello Matthew,

Thanks for the answer but the problem is that I need an event to launch the ActApp.CurrentView.RefreshView method.
When I delete a product in the list, it fires the event "CurrentOpportunityChanging" and everything is working perfectly but when I add or update a product, the event "CurrentOpportunityChanging" isn't fired !
I'm a little bit confused here ....
Employee
Posts: 1,163
Country: USA

Re: Refreshing opportunity detail view

That's surprising and sounds inconsistent, I'll have to take a look at that.

 

Is Opportunity.Updated not firing either? The OpportunityProduct class also has a Updated event.

Matthew Wood
Act! SDK Support
Community Moderator
Tuned Listener
Posts: 16
Country: Belgium

Re: Refreshing opportunity detail view

The event "Opportunity.Updated" isn't firing either once I click on the OK button from the "Add/Update product". Otherwise, the event is firing normally.
TIA !