Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Unified Service Desk - Consecutive calls to "FireRequestAction" (Open_Crm_Page) directed to "GlobalManager" have unpredicatable behavior

$
0
0

Hil all,

We are trying to show two CRM pages as the result of a cti look up request returning one (and only one) CRM "customer" object. This pages are to be rendered on top of each other in the "horizontal split panel".

Using data attached to the phone call being handled, we are able to id the "customer" (account, contact, lead) and, for example, receive an email ID. With this information we show two CRM page, one with the "customer" data (e.g. the CRM contact page, if the customer is a "contact") and the other with the email (or whatever...)

During our tests we detected that if we perform two successive calls to the "FireRequestAction" API triggering the same USD "action" on our configuration's GlobalManager hosted control, some of the times one of the pages is not rendered.

The following code snippet illustrates the failure:

                string actionData = string.Format("Id={0}\nLogicalName={1}", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "contact");
                string action = "Open_CRM_Page";
                FireRequestAction(new RequestActionEventArgs("bugGlobalManager", action, actionData));

                string actionData2 = string.Format("Id={0}\nLogicalName={1}", " "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "account");
                string action2 = "Open_CRM_Page";


The only workaround we were able to find, was to separate each call to "FireRequestAction" on different tasks applying a "sleep" (greater than 100ms!) before making the actual request...

                Task.Factory.StartNew(() =>
                {
                    System.Threading.Thread.Sleep(contactDelay);
                    string actionData = string.Format("Id={0}\nLogicalName={1}", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "contact");
                    string action = "Open_CRM_Page";
                    FireRequestAction(new RequestActionEventArgs("bugGlobalManager", action, actionData));
                });

                Task.Factory.StartNew(() =>
                {

                    System.Threading.Thread.Sleep(emailDelay);
                    string actionData2 = string.Format("Id={0}\nLogicalName={1}", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "account");
                    string action2 = "Open_CRM_Page";
                    FireRequestAction(new RequestActionEventArgs("bugGlobalManager", action2, actionData2));
                });


Naturally, you should change "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" with valid GUIDs.

We have two Window Navigation Rules associated with the "GlobalManager" control. The navigation rule with order "1" is attributed to some specific entity (like email, for example), the other one is more generic and has no entity value so that it is considered as a fallback whenever the first one "fails".

We haven't been able to find adequate information on how to use "FireRequestAction", so we could be doing something wrong. Has anyone experienced this behavior?

We have implemented a small project that replicates this behavior. If someone is interested we can provide access to it.

Thank you,

José Alberto Silva


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images