locked
How to fire Action in Unified service desk RRS feed

  • Question

  • Hi,

    I have a requirement like, based on the field value of KB article I need to load Agent Script.

    Field : Advanced Verification Needed ------ true /false

     I have two Agent Scripts

    1.   Basic Verification

    2. Advanced Verification

    If it is false It has to Load 'Basic verification" Agent Script.

    if true it has to load "Advanced verification" agent Script.

    When an agent receives call from the customer, he will open Kb article. Onloading of Kb article Agent script has to loaded based on  field value.

    I am retrieving Value of the field using GUID of the kb article and checking

    I am able to retrieve field value but unable to fire Action

    it is entering into "if" block and throwing error at FireAction.

    if(Article[advancedverificationneeded] as bool==true)

    {

    FireRequestAction(new Microsoft.Uii.Csr.RequestActionEventArgs("Agent Scripting", "GotoTask", "Advanced Verification"));

    }

    else

    {

    FireRequestAction(new Microsoft.Uii.Csr.RequestActionEventArgs("Agent Scripting", "GotoTask", "basic Verification"));

    }

    I have written this in custom action of USDcustom control. . I am call Custom action Action of custom control onloading of KbArticle.

    This piece of code is Stopping my USD completely


    can you please help me

    Thank you.

    Chitharanjan.


    Friday, July 3, 2015 1:32 AM

All replies

  • Hi

    Is there any specific reason why you went to Custom Hosted control for your KB article? Can't we user Standard Web Page/CRM page for this ? The advantage if you use them is, that should read the values on the page and should automatically set the values in the context. And you can use the Page load complete event to trigger your agent script based on simple conditions. In this way, It would become 0 lines of code.

    I haven't really checked the above possibility but theriotically as per MSDN it should be doable like this, worth giving a try I belive.

    Coming to your actual problem, I really dont see any issue why it wouldnt fire the action call. 2 things I would like to try first in that scenario a)Open the debugger and see what actions it is firing and any failures of action 2) use FireEvent method of the hosted control instead of FireRequestAction which  I have used in some situations where i have to do multiple actions (where as in your case it is only one action but still would work). 

    Happy Coding !!

    Regards

    -Srikanth


    Imposible it self is having Posible.. Dont leave it until you get it..

    Friday, July 3, 2015 7:53 PM
  • Hi Srikanth,

    I dont have any particular reason to use custom control, but  When kb article loads, all the values of kb article should be added to Repalcement parameters  list (just like when we open contact form, all the values will be in Replacement parameters). but it is  adding only url of the kb article which contains Guid of it. So from there i am trying to catch Guid of it. and retrieving kb article using GUId to get "Advanced verification needed" value to check and load agent Script based on that value.

    Sunday, July 5, 2015 3:44 PM