Monday 16 November 2015

How to Write Automations to Web Applications or Windows Applications


1. Go to

Download SDK and UII

Download UII and Extracts.


2. Go to \UII\Templates Run the UII Inspector tool.

This will add Templates in Visual Studio. you Can see bellow Screen





Wednesday 23 September 2015

How to Update Notes to Replacement parameters in Unified Service desk (USD)


While agent is Speaking to Customer, he may make some notes in Notes Panel. When call ends, the Notes should be stored in Notes of CRM Record.

At this point We can use below Action to get The Values from Notes Panel.


Click  here to see how to Create Record in CRM




How to Create a Record in CRM with USD Action call-Unified Service Desk (USD)

1. If we want create a record inCRM with USD Action call, We have an Action "Create Entity" on Global Manager.


2.
http://msusd.blogspot.in/2015/09/how-to-auto-populate-fields-in-new-crm.html

Tuesday 22 September 2015

How to Navigate to Perticular Views in Unified Service Desk (USD)



Open forms, views, dialogs and reports with a URL

 Navigating in CRM is based on Entity name and GUID of the Record. Framing URL for different forms

https://msdn.microsoft.com/en-us/library/gg328483.aspx

How to Change Page name Dynamically when multiple Pages are allowed in CRM Page hosted control--Unified Service Desk (USD)


1. As we already know that ,we can open multiple pages in Single CRM Page hosted control.
by default the name will be Tab name of Browser.

2. To Change the name of the Page we need an action call



try {
    document.title = "[[Incident.casetypecode]+] "
}
catch (e) {

}

we can set any name as title of Page by passing dynamically as shown above.

3. See the bellow Screen to verify




Wednesday 16 September 2015

How to Navigate to Perticular Dashboard by Passing URL in Unified Service Desk--Unified Service Desk (USD)

1. Create a Hosted Control of type CRMPage.
2. Create an Action Call with Action "Navigate"
3. Give the URL in data field

url=dashboards/dashboard.aspx?dashboardId=%7b36132013-5A26-E511-80BE-000D3AA0DA2D%7d&dashboardType=1030&pagemode=iframe


the above highlighted is GUID of the Dashboard. 

How to Create Entity Search and Using in Replacement Parameters -Unified Service Desk (USD)



1. To Create Entity Search in Unified Service Desk
We need fetch XML. So open Advanced Find and Give Some Criteria which we want to fetch. Download the fetch XML



 2. Click on Entity Search and Click on "New" to Create new Entity Search.



3.  Create an Entity Search in USD
 4. Create an Action Call to Search.
Enter Hosted Control --CRM Global MAnager
Action- DoSerch
Data-as shown in bellow fig
 5. Call the Action call in Debugger;

 6. We can See the results As Shown in bellow fig. We can Use these values as replacement Parameters

How to Close Current CRM Page When Multiple Pages Allowed In CRM Page Hosted Control--Unified Service Desk (USD)



 In The Previous Post we have seen how to open multiple Pages in Single CRM Page Hosted Control.
Now we are going to See how to close CRM Pages in Hosted Control.

1. We need Create a button under the Hosted Control to Which we want to Create Multiple Pages
See How to Create a button here



2. Create an Action call with Action "Close Active" for The Hosted Control and Associate it to the Button as shown in Above Screen Shot


3. We can See the button as Bellow.




How to Open Multiple Forms in Single CRM Page Hosted Control --Unified Service Desk (USD)




1. Create a Hosted Control of type CRM Page.
Allow Multiple Pages--Yes
Maximum No.Of Browsers=(value)
If we didnt specify any value then
by default it is 3



2. We Can see Multiple Pages In USD as bellow.
In Agent Script panel we have 
a. Inquiries
b. Complaints
c. Service Request 
On Click of each link the corresponding form will be loaded. But all the forms will be in Same hosted Control as shown bellow




Friday 4 September 2015

How to set Optionset Value dynamically Using Scriptlet in Unified Service desk--Unified Service Desk (USD)

1. To set Option Set value Dynamically We need to Create A Scriptlet.



2. get Option set Values from field .



As the same way get all the values for remaining options too.


function getcomplintype() {

   //Get the text value from Replacement  parameters or pass text value
    var val = "[[$Scriptlet.getsubject]+]"
    //var val="option1"

    if (val != "") {
        if (val == "option1") {

            return 839540000;
        }

        else if (val == "option1") {
            return 839540001;
        }
        else if (val == "option1") {
            return 839540002;
        }

        else if (val == "option1") {
            return 839540003;
        }

        else if (val == "option1") {
            return 839540004;
        }
        else if (val == "option1") {
            return 839540005;
        }
        else if (val == "option1") {
            return 839540006;
        }

        else {
            return "";
        }
    }
}
getcomplintype();


2.Pass the Integer value to option Set


How to Auto populate fields in new CRM page in Unified Service desk--Unified Service Desk (USD)


1. Create a hosted control with USD component type=CRM Page

2. Create  an Action call  passing the bellow values based on type of field. give LogicalName of the entity.

LogicalName=incident 

3. If we have multiple forms in one entity, in order to navigate by changing form type, we can directly navigate to corresponding form by passing formId.

formId=16381886-6D0A-49E5-9F32-AC12F1FEDCA7

4. If There is any lookup to set then Pass the values as bellow.

customerid=EntityReference([[$Context.InitialEntity]],[[$Context.Id]])
customeridname=[[$Context.fullname]+] 

5. If we have any Optionset field to set then pass value as bellow.

casetypecode=OptionSetValue(2)


6. Set text field by directly passing text value

title=Complaint







Friday 28 August 2015

How to auto login into any website while Loging into USD--Unified Service Desk (USD)

As Agent logs in USD then Agent doesn't want to enter his credentials. He needs Single Sign On.
This we have approached in simplest way.

1. We need an Entity to hold Our Passwords and Usernames
2. we Need three Fileds
  a.Name
  b.Username,
  c.Password
3. Create a record in CRM in Credentials entity

4. Create a hosted control of type CRM Page
5. Create an Action call to Navigate to facebook and invoke this on button click

6. Create an Entity Search in USD to retrieve Credentials from CRM



7. On Page Load complete of Facebook hosted control Create Action call to Search Credentials

8. Create one more Action call to Set values and Login


Now open USD and Click on button to which you associated navigate to facebook Action Call.


Wednesday 26 August 2015

How to open new CRM Page based on form Id in Unified Service Desk.--Unified Service Desk (USD)

Generally we have an Action "New_CRMPage"
In Data field give

LogicalName=entityschemaname
formId=*********************

How to trigger an Unified Service Desk event onChange of CRM field--Unified Service Desk (USD)

 We got a requirement in my previous project. Onchange of CRM field value we wanted to trigger USD event. So we have approached in bellow way.

1. Click On Events


2.Create an Event in USD with name "OnChange"


3. Call your Action call to perform some Action when it is triggerd. If it is already exist select from the list. If not Create new by clicking "New" at the Corner.

 4. You can see that Action call added to event and Click on Hosted Control "Incident"

 5. navigate to Events of the Hosted control

6. Here we Can see Onchange event which we Created.
now Click On PageLoadcomplete event
7. We can see that there is no Action Calls at PageLoadComplete 


8. Create Action call with Action  RunXrmCommand by clicking "New"


9. In "Data"  Write the bellow code




function hookonchange()
{
window.open("http://event/?eventname=OnChange");
}
Xrm.Page.data.entity.attributes.get("yourfieldname").addOnChange(hookonchange);

How to Create Toolbar in Unified Service Desk--Unified Service Desk (USD)

Toolbar is the place where we can hold all the tool together.

Lets Create a toolbar
1. Select "Toolbars"
2. Click "New"
3. Enter all the fields.  
---Name is mandatory and we can give any name
---Order is optional. If we give order it will show this Toolbar by order on USD Screen.
---Title can be any name
---Enable Condition- We can give condition like(i==1) if it is true then it will Enable on USD Screen.
---Display Condition--It will display based on Condition. if it is false then it will not display on USDScreen.

To add buttons click on" +"

4. Give Name
--Image can be added from Webresource
--Button Text will be the Display name for button.
--Order will be considered as order of button in Toolbar.
--Tooltip is mouse over text
--ShowTab will Focus the given Hosted Control.
--Enable Condition- We can give condition like(i==1) if it is true then it will Enable on USD Screen.
--Display Condition--It will display based on Condition. if it is false then it will not display on USDScreen
 After Save
--Add Action call to the Button. to add Action Calls click on "+"


5.  Search for Action call if already exist. if No, Create new Action Call by Clicking "new" at Corner

6. We can see Action Calls are Added .

7.  To Add Toolbar to Hosted control In navigationbar click on Down Arrow and Select Hosted Controls.


8. Select the Hosted Control to which we want to Add buttons. 
Generally it can be Toolbar container hosted Control. But we Can be add to any Hosted Control.
9. We Can see the buttons which are added under Dashboard
 


How Action call works in Unified Service Desk--Unified Service Desk (USD)

Before going to know about action call we need to know UII Actions. UII Actions are like methods in programming. We can pass parameters to UII Actions. In Actions call there is a field called "Data". We can pass parameters through that Data filed.

On create of every Hosted Control CRM will create corresponding UII Actions.  We have different UII Actions based on Hosted control.

Lets create an Action call
1. Name is the mandatory field. We can give any name

2. Order is an Optional field. if we have two are more action calls at some button click, then order will come into picture. if we did not mention any order then it will execute randomly.

3. Hosted control need be to selected on which control we need to perform the Action.

4. Action need to be selected which Action we want to perform.
5. Data is an optional field but it is mandatory based on Action. Here we can pass parameters to Action. Not all the Actions take parameters. Some Actions take parameters some are not.

As we discussed above, UII Action is a method and Data is parameters. In the above screen  "New_CRMPage" is a method and

" LogicalName=contact
name=Demo
mobilephone=12345678
telephone1=98763234
emailadrress1=email@email.com"

are the Parameters for New_CRMPage.


Thank you. I hope it will help.