Monday, 26 December 2016

Set Up CRM Portal in Dynamics CRM 365

Dynamic CRM 365 - CRM Portal







Dynamics CRM 365 is shaping up to be a one of the largest updates to CRM with the inclusion of new application extensions, Project Service, Field Service and most interesting CRM Portals.. 

Introducing of CRM Portals really removes a lot of the previous barriers there was to self-starting your installation and portal deployment, with a couple of clicks now you can get CRM Portals up and running with a ready to use scalable public facing site.

The following instructions will help you to set up newly integrated CRM Portal websites for your Dynamics CRM 365.

Step 1 Create Dynamic CRM 365 trial using below link:


https://signup.microsoft.com/Signup?OfferId=bd569279-37f5-4f5c-99d0-425873bb9a4b&dl=DYN365_ENTERPRISE_PLAN1&Culture=en-us&Country=us&flight=AdminOnCustomization&ali=1


Step 2 Click on 'Admin' 





















Step 3 Navigate to 'Admin Center'








































Step 4 Navigate to 'Dynamics 365'












































 Step 5 Select your CRM Instance and Click on Solution 'Edit'.


















 Step 6 Once your Portal is installed, Go to 'Application' tab and click on 'Portal Add-On' to configure Portal settings.



              


 Step 7  Select the Portal you want to install in your CRM instance and Click on 'Install'. and Wait until solution not get fully installed.
























Step 8 Enter below mentioned details to configure the Portal in your CRM instance.



Step 9 Hit Portal URL in browser.


You will be asked to login again and accept to provide certain permissions to access Dynamics 365 (CRM) and Office 365 data.


Step 10 Click Accept


Portal requires below permissions:

Read directory data – Allows the app to read data in your organization’s directory, such as users, groups and apps, without a signed-in user.


Enable sign-on and read users’ profiles – Allow users to sign in to the application with their organizational accounts and let the application read the profiles of signed-in users, such as their email address and contact information.

Go and have cup of coffee…Your CRM Portal is getting ready in few mins...   :)







Saturday, 24 December 2016

Use OData Query in ADXStudio

As we know Adxstudio Portal is now one of the most used Web Portal integrated with Dynamic CRM and one of the most common requirement and frequently asked question by developers is How to use retrieval query on Portal to fetch data from CRM.

One of the most common requirement on Portal is to auto populate data in entity forms fields based on lookup value.

For Example : As soon as user select customer in Customer lookup field, I want to auto populate selected customer entity data on case entity form fields (customer email, mobile phone, company name etc). Like this there might be so many requirement to fetch CRM data on portal conditionally.

Before going through the usage of OData in Adxstudio Portal first let us understand what is OData.

What is OData ?
OData is also referred as Open Data Protocol. Dynamic CRM mainly uses Windows Communication Foundation (WCF) data services framework to provide OData Endpoint which is nothing but a REST based data service. The address for the endpoint is:

https://{OrganizationRootUrl} /XRMServices/2011/OrganizationData.svc

How to use OData in Adxstudio Portal ?

I have been asked so many times for how to use OData Query in Adxstudio Portal,

Below are the steps to use OData query in adxstudio :-

Step 1 - Create Entity List in CRM with below mentioned configuration.

Name of Entity List, Entity Name, Website, View, OData Feed - Enabled,Entity Type Name, Entity Set Name, View





Step 2 -  Test OData.


Hit your portal url  on browser in below mentioned format.

<Portal Url>/_odata   -  This will give you all Entity list in which you have enabled OData Feeds.





Hit your portal url  on browser in below mentioned format.

<Portal Url>/_odata/<Entity Set Name>   -  This will give you the result of OData on browser.

Step 3 -  How to use OData in JavaScript (on Entity Form/Web Form/Entity List/Web Page/).


// Start Case Retrieval code

var GetResolvedCases = "~/_odata/cases?$filter=statuscode/Value eq 1";

or

var caseGuid = 'A237C638-F47B-E611-80F2-5065F38BF2F1';

var retrievebyGUID = "~/_odata/incidents?$filter=incidentid%20eq%20(guid%27" + caseGuid + "%27)";

$.ajax({
    type: "GET",
    url: GetResolvedCases,
    dataType: 'json'
}).done(function (json) {

    var CaseColl = json.value;

    // Get Case ticket number
    if (CaseColl[0].ticketnumber)
    {
        CaseId = CaseColl[0].ticketnumber;

    }
})
})

// Case Retrieval code End


Using above code you can get Case ticket number, if you are familiar with Dynamic CRM OData query then you can make query as per your requirement, or you can refer below link to know more about OData query syntax and uses.

Note : Refer below link for more details about how to write OData Query in CRM/Portal

https://msdn.microsoft.com/en-us/library/gg309461(v=crm.7).aspx


Blogger Widgets