Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

USD - Change URL based on CaseID

Posted on by 295

Dear all,

I am new to Microsoft Unified Service Desk, therefore please pardon me if i make any mistake.

My scenario is when a call is received by a call center agent in Unified Service Desk then initially he will create a case for the particular customer and initially the caseID will be null therefore call center agent will see a new case window where he can create a case. Once the case is created he will save the details and the caseID will also be saved. Now, in the next step he will transfer the call to the supervisor and in this case the supervisor will not see a new case window instead he will have the details in-front of him of that particular customer that were saved earlier.

I think i might need to use JavaScript and something like below

if(Case id != null)
Open case page with associated id
else 
Executejavascripot("url with customer id to create new case")


But how will i achieve that do i have to create a hosted control and is there a way i can execute JavaScript inside hosted control.

Looking forward to your help.

Thanks.

*This post is locked for comments

  • Faran Saleem Profile Picture
    Faran Saleem 295 on at
    RE: USD - Change URL based on CaseID

    Thank you soo much for your help.

    Both the solutions you provided worked for me. Much appreciated!

  • Verified answer
    Kaustubh Hegde Profile Picture
    Kaustubh Hegde 330 on at
    RE: USD - Change URL based on CaseID

    Use this code :

    Context dataContext = localSessionManager.GlobalSession.AppHost.GetContext();

               dataContext ["<<DataParameterName>>"] = <<Data to be passed>>;

               localSessionManager.GlobalSession.AppHost.SetContext(dataContext);

               FireRequestAction(new RequestActionEventArgs("<<HostedControlName>>", "<<ActionName>>", globalContext));

  • Faran Saleem Profile Picture
    Faran Saleem 295 on at
    RE: USD - Change URL based on CaseID

    When i am trying to pass "LogicalName = incident" from my code then the page in USD gets open but it is an empty page.

    Also, in my debugger ActionData is empty.

  • Faran Saleem Profile Picture
    Faran Saleem 295 on at
    RE: USD - Change URL based on CaseID

    Thank you so very much for your help, it worked.

    But one more thing what if i want to pass the data parameters from my xaml code.

    I am doing something like this,

    var actionData = "LogicalName = incident"
    FireRequestAction(new RequestActionEventArgs(USDHostedControl, USDAction, actionData));


    But it is not working. It gives me below error in my debugger of USD,

    Not all parameters in action call UpdateEntity are available, aborting action call.

    Looking forward to more help.

    Thanks

  • Verified answer
    Kaustubh Hegde Profile Picture
    Kaustubh Hegde 330 on at
    RE: USD - Change URL based on CaseID

    Follow the steps below

    1. Create an action with below settings

    Hosted Control : CRM Global Manager

    Action : New_CRM_Page

    Data : LogicalName= incident

    Condition : "[[CASEID]]" == ""

    **Note that the CASEID parameter in the condition is same as the one you are receiving from your CTI

    2. Create one more action with below settings

    Hosted Control : CRM Global Manager

    Action : Open_CRM_Page

    Data :

    LogicalName= incident
    id= [[CASEID]]

    Condition : "[[CASEID]]" != ""

    3. Add both these actions on the even where you are receiving the call. As you have added conditions now, one that specific action that passes the condition will run. Hence if case id is null, New CRM Page will open else existing record will open.

    4. In case you are not able to execute it in the above steps and want to implement using JS, you can create an action, Hosted Control : Incident, Action : RunScript, Data: your JS logic

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans