Community
Showing results for 
Search instead for 
Do you mean 
Reply

VERY annoying problem for large customer (80 users)

Copper Contributor
Posts: 98
Country: Netherlands

VERY annoying problem for large customer (80 users)

-- reposted this topic because it doesn't show up anymore after posting it last week --

 

Hi all,

 

We have a _very_ annoying problem with Act! Opportunity Detail view that occurs to an important large client of ours. This client has a lot of Act! users and multiple establishments, in the Netherlands and the UK, so we are in quite a hurry to get this problem solved.

 

The difficult thing is that it does not always occur (hard to reproduce), but frequently enough to drive people crazy and becoming mad at Act!. I’ve only seen it once at the customers (my colleague Rolf Oosting who has implemented Act! there has seen it more often), never on the development machine.

 

The problem:

When they create an opportunity, and then ‘do certain things’ like searching for fields or going to the Opportunity Listview and then clicking a contact, and then going back to Opportunity Detail view, all tabpages are duplicated. Besides that, all tabpages seem ‘empty’.

See attachment ‘screenshot.png’, and also a video: ftp://gebruiker:download@ftp.hidrive.strato.com/public/tmp/video.MP4

 

Thing is, we’ve built an add-on for them, and it does not seem to occur when that add-on is not loaded. But we’ve got no idea why that addon triggers this problem. The add-on, like other addons of ours, creates a tabpage ‘producten’ (a custom product overview).

When the problem occurs, this tabpage is the only not-empty tabpage. After the duplication of all tabpages, this tabpage is also duplicated, and only the last one (right side of screen) is not-empty, the previous one is empty like all Act!’s own tabpages.

I’ve included the Plugin class as attachment, with some non-relevant business logic scripped out.

 

We very much hope you can think of a possible cause – and more important – a possible solution for this.

Looking forward to your reaction!

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands
J G
Copper Contributor
Posts: 46
Country: USA

Re: VERY annoying problem for large customer (80 users)

Had the same problem with Jim Durkin's Impact Suite, he might be able to help.
Copper Contributor
Posts: 98
Country: Netherlands

Re: VERY annoying problem for large customer (80 users)

Good to hear we're not the only one having this problem. We sent the problem to Jim Durkin as well.

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands
Bronze Super Contributor
Posts: 1,233
Country: USA

Re: VERY annoying problem for large customer (80 users)

Can you send me the two DLL so I can compile and test?

 

IntoTranslator

TndAdvancedProductList

 

Thanks

-- Jim 

Copper Contributor
Posts: 98
Country: Netherlands

Re: VERY annoying problem for large customer (80 users)

Hi Jim,

 

I’ve posted the most basic version of the add-on to the topic, only the tab creation. It creates a tabpage ‘TESTTABPAGE’.

It's the solution (zipped) as well as the DLL (TndAdvancedProductList.dll).

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands
Bronze Super Contributor
Posts: 1,233
Country: USA

Re: VERY annoying problem for large customer (80 users)

Oh yes, I now remember this issue. Welcome to the bizarro world of the opportunity view.

 

Ever since the opportunity view was promoted to a top level entity starting in ACT 2010 the opportunity view DOES NOT behave as you would think a view should. ( ie contacts, companies and groups) In fact EVERY TIME you navigate to the opportunity view the ApplicationState_LayoutLoaded  event gets raised.

 

To Test: Remove Impact then place a break point in your code. Notice ACT raises the LayoutLoaded event every time navigating to opportunities. 

 

See my post on this topic a few months back ( unanswered by the way) https://community.act.com/t5/Act-Developer-s-Forum/ShowOpportunity-Opportunity-SDK-ISSUE/m-p/339787/...

 

This was an issue in Impact Suite too. In order to correct I check if the tab exists before adding it. If you leave the check up to the UILayoutDesignerManager.AddTabToCurrentLayout  method it will fail occasionally adding duplicate tabs.

 

Does this help?

-- Jim 

 

 

 

 

 

Copper Contributor
Posts: 98
Country: Netherlands

Re: VERY annoying problem for large customer (80 users)

Hi Jim, actually, no, it doesn't help. I do have a 'loadedTabs' list, and I do check if the tab is added from Application_ViewLoaded (see my plugin code) prior to adding the tab, but I commented that checking part out in the LayoutLoaded handler because it otherwise only adds it one time, the next time you switch to opportunity detail view OR switch opportunity layout the tab is gone. 

 

Besides that, _ALL_ Act! (default) tabpages are duplicated, not only our own! Plus the fact that they're all empty. And it does _not_ occur on my PC, only on the client's, and also not always. So it's nearly impossible to 'check if something works' because it's so hard to reproduce in a controlled environment.

 

What I havent tried yet is leaving the code in the LayoutLoaded handler as it is (without the check if it's already added), but removing it from the ViewLoaded handler. Don't know if it works but it's worth a try.

 

But of course we need a proper answer/explanation/fix from the Swiftpage guys for this problem. Because now it's kind of blind typing because they're the only ones really understanding this behaviour (I hope though).

 

 

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands
Copper Elite Contributor
Posts: 89
Country: Canada

Re: VERY annoying problem for large customer (80 users)

Your problem might be this line:

 

            actApp.UILayoutDesignerManager.RefreshAvailableLayouts();

I believe this is causing the entire UI to be refreshed and that might cause duplication. i ran into a similar issue when i created a field importer and after the field was created, i was calling RefreshSchema(true). This caused a bunch of issues from duplication of tabs to memory leaks. Once i removed the "true" parameter (raise events), everything worked fine.

Ahsan Khalid

Chief Technology Officer
Keystroke Quality Computing Inc.
www.keystroke.ca

Copper Contributor
Posts: 98
Country: Netherlands

Re: VERY annoying problem for large customer (80 users)

Hi Ahsan,

 

thanks for your answer. I could try leaving this one out too, if it's causing problems. We'll see!

 

I'll post it here if it worked out for the client (but then that could also be due to the leaving out of the tab adding at viewloaded.. but hey, solved is solved.).

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands
Highlighted
Moderator
Posts: 706
Country: USA

Re: VERY annoying problem for large customer (80 users)

[ Edited ]

 

I can duplicate this issue by repeatedly going back and forth at blazing speeds between the details view and the list view, then rapidly clicking the details view once Act! got a little behind.  After it catches up, it loads the details view several times, duplicating the added tab.  I was not able to duplicate the part where it doesn't show anything on the other tabs, but that could be because of the custom layouts.  I'm not sure.

 

I started out by throwing some simple MessageBox.Show() lines in, and here's what I discovered:

 

Your _ViewLoaded event only fires once when loading a view.  This is expected.

Your _LayoutLoaded event fires several times when first loading a view.  Twice just going to the Detail View.  This was more than I expected.  This might be because of refresh, but I'm not sure.

 

When rapid firing on the Details View button, I found that it would give me the popup that the layout had refreshed many times in a row, each time it would add the tab.  I believe these events are all firing at once, after the load is complete, and looping on itself as there's a refresh that happens at the end of the load.

 

How I resolved half of this:

 

The less than graceful way I was able to hobble together: First thing was to remove tab creation from the LayoutLoaded event, and remove the && condition from line 2 of the ViewLoaded event.  I added a tab clearing line in as well.

 

This fires each time a view is loaded, checks to see if it's the opportunity detail view, and adds the tab.  I'm not sure offhand if I need to keep the Clear or Nulling lines.  Here's my new ViewLoaded event:

 

 

private void Application_ViewLoaded(object sender, ViewEventArgs e)
        {
                // VOOR HET FORCEREN VAN EEN REFRESH DE 1E KEER, DOE DIT IN DE Application_ViewLoaded
                string ViewName = e.View.GetType().Name;
                IOpportunityDetailView iodv = e.View as IOpportunityDetailView;
                if (iodv != null) // && !loadedTabs.ContainsKey(ParentEntity.Opportunities))
                {
                    loadedTabs.Clear();
                    this.AddTabToDetailView(ParentEntity.Opportunities);
                    loadedTabs[ParentEntity.Opportunities] = null;
                    return;
                }
        }

 

 

 

While this keeps it from loading multiple/extra tabs, if you change the layout it immediately removes the tab until you reload the view.  If changing layouts is a thing your clients do often, it could still be annoying.

 

I hope this helps somebody.

 

 

 

Billy Clark
Swiftpage
Act! Knowledgebase: http://kb.act.com