Wednesday, 16 September 2015

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