{Step by Step Guide} Query Dynamics CRM Web API using Server to Server Authentication with Application User

Query Dynamics CRM Web API using Server to Server Authentication with Application User

I have wrote quite a few articles over the last one year to query Dynamics Web API using ADAL from client side and as well as server side. However lately I am receiving loads of queries on how to Authenticate with web-API without using any user credential or how to authenticate with new Server to Server (S2S) authentication.

I thought of providing some good links already available there. However I feel that some of the steps mentioned are not pictorially represented. Hence penning down this blog for the benefit of my blog readers.

In this example I will give a complete example of querying the list of account through Web API from a External web app and not just getting the bearer token.

There are two steps to this example

1. Get the token Authorization token from Azure

2. Send the authorization token to get the list of accounts from CRM using the Web API endpoint.

 

Step 1: Register your application with Azure to get the Client ID and Client Secret

 

image

  • Enter the necessary information. Name is anything you wish to give. Sign-on Url is my website’s sign-on page.

image

  • Once the application is created then note down the Application ID and then click on Settings. You Application ID here is the Client ID.

image

  • Click on Required Permissions –> API’s –> Select an API and choose – Dynamics CRM Online

image

  • Choose Delegated permissions as highlighted below and the save your settings in Azure.

image 

  • Then click on Keys. Enter the key name to get a key value. Copy it immediately and store it. It is your client secret.

image

 

Step 2: Use ADAL in your Code to get the bearer token

The next step is to get the bearer token. To do this, open your project and through Nu-get package manager, add reference to the latest version of ADAL.

image

 

Below is the code to get the bearer token. Please read the comments to make the code work for your organization.

ClientCredential credential = new ClientCredential("<replace with your client id>", "<replace with your client secret>");

string authorityUri = "https://login.microsoftonline.com/xrmforyou53.onmicrosoft.com/oauth2/authorize"; // here xrmforyou53.onmicrosoft.com is my crm domain. Please replace with your domain
TokenCache tokenCache = new TokenCache();

            AuthenticationContext context = new AuthenticationContext(authorityUri);
            AuthenticationResult result = await context.AcquireTokenAsync("
https://xrmforyou53.crm.dynamics.com", credential); // https://xrmforyou53.crm.dynamics.com is my CRM URL. You need to use your crm url to test this.

            var authToken = result.AccessToken;

 

Please observe, we have not used the credentials of any user anywhere.

 

Step 3: Get the accounts from CRM.

So far you may be thinking that this is what we have already tried before as well. What’s new in this.

Well I take the below piece of code and try to load my account list.

public async Task LoadAccount(string bearerToken)
       

 

However I receive 401. Unauthorized error.

If you are feeling now it’s time to learn something new, you are right. But before we go ahead, let’s understand why you are getting unauthorized error. After all, in Azure I gave the app to access Dynamics as a Organization user.

That step enabled the client application to access Dynamics CRM by using the Application ID and the client secret. Your client application is now able to be authenticated against Azure AD with permission to access CRM Online. However, CRM Online does not know about this "client application" or "user". CRM API will response a 401 if you try to access it.

So let’s jump to step 4.

 

Step 4: Create an Application User in CRM and assign security roles to it.

Well this may be a previous step but I deliberately put it in the last one to make you understand the unauthorized error.

Go to CRM –> Security –> Users and switch the view from the default view to “Application Users”.

image

 

Click on the New button to create a New Application User. You may be landing to the user form by default. Change the form to application user form.

image

 

In the application ID, enter the application ID of your app you obtained from Azure in Step 1.

I put the name of the user as – WebApp Application User

Email I put as – webappuser@xrmforyou53.onmicrosoft.com. I have used my domain. You better use your CRM domain. The name will automatically populate from the email you give. Once you save the record, CRM will auto populate the Application ID URI and the Azure AD Object ID.

 

Now in this example we are trying to retrieve account records. So it’s better you create a custom security role and assign to this user which will give the application user read permission on the Account record. I copied the Salesperson role and then assigned to this application user. Basically whatever operation you want to perform using Web API, you need to provide the same privilege to the application user.

Now when you run the code in Step 3, this time you get the account JSON. The icing on the cake is Application user won’t consume CRM licenses as well.

Hope this was helpful for you guys.

 

Debajit Dutta

(Dynamics MVP)

For consultation/ training visit www.xrmforyou.com or reach out to us at info@xrmforyou.com

Advertisements

Author: Debajit

I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side.

Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com

Author of multiple tools on codeplex including the ‘Role Based Views’ and ‘CRM-Sharepoint Metadata manager & Attachment Extractor’ which are available for commercial use under XrmForYou.com

For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

Published at Thu, 16 Aug 2018 10:15:27 +0000

Boosting Your Sales and Marketing Productivity with PowerPack Add-ons

Boosting Your Sales and Marketing Productivity with PowerPack Add-ons

PowerObjects’ PowerPack add-ons are developed based on the needs and feedback from our customers, the PowerPack tools are not just simple customizations for sales force and marketing automation, but offer true features to help you get the most out of your Dynamics 365 investment. Get even greater sales and marketing functionality and productivity all for just $1-2 per user, per month. Learn more about a few of our favorite PowerPack add-ons and get a customer’s take on how add-ons have helped their marketing in the videos below!

Use PowerSchedule to schedule service offerings, register contacts, and manage classes all from within Dynamics 365.

Get a deeper dive into PowerSchedule in our On-Demand Webcast!

With PowerMap you can choose an entity, choose a view, and plot all of the individual records from that view on one map in Dynamics 365.

See an in-depth demo of PowerMap in our upcoming Live Webcast – register here.

Use PowerChat to live chat and track conversations from visitors on your website within Dynamics 365.

You can check out all the features of PowerChat is this On Demand Webcast.

Birkie uses several PowerPack add-ons to assist with event management, participant and vendor communications, and for increased productivity.

Read the full case study on Birkie’s success with Dynamics 365 and PowerPack add-ons here.

Did you know you can try any of our PowerPack add-ons FREE for 30 days with no risk and no pressure to commit? There are no setup fees, no long-term contracts (simply month to month), and no credit card information required. Learn more and get started here.

Happy Dynamics 365’ing!

Published at Wed, 15 Aug 2018 17:58:08 +0000

[unable to retrieve full-text content]

Published at

D365 In Focus: The 3 Best Features of PowerMap

D365 In Focus: The 3 Best Features of PowerMap

PowerMap is a PowerPack add-on by PowerObjects that allows users to get a visual representation of their records in CRM. In this D365 In Focus video, PowerPack Pro, Zach, guides us through the three best features of PowerMap. Check it out!

Register for our PowerMap Live Broadcast to see a full demo and learn more!

powermap

Published at Thu, 09 Aug 2018 18:16:54 +0000

[unable to retrieve full-text content]

Published at

Microsoft PowerApps, Microsoft Flow, SharePoint and Dynamics 365 working together, No coding required!! Check out my new post.

Microsoft PowerApps, Microsoft Flow, SharePoint and Dynamics 365 working together, No coding required!! Check out my new post.

Check out my new blog post on how Microsoft PowerApps, Microsoft Flow, SharePoint and Dynamics 365 working together with no coding required.

https://dynamics365.wordpress.com/2018/08/04/microsoft-powerapps-microsoft-flow-sharepoint-and-dynamics-365-working-together-no-coding-required/

Advertisements

Published at Sat, 04 Aug 2018 03:03:51 +0000

[unable to retrieve full-text content]

Published at

Merge Duplicate CRM Records with the Click of a Button with PowerMerge

Merge Duplicate CRM Records with the Click of a Button with PowerMerge

PowerMerge is a PowerPack add-on with a lot of power! Having clean, up-to-date data in your CRM is vital to any organization. With multiple people entering information into a CRM system daily, it happens all too often that duplicate account, contact, and lead records are created.

With PowerMerge, Microsoft Dynamics 365 users can quickly and efficiently merge duplicate CRM records based on the information entered in the email, company, or name fields. The solution then counts and merges all your duplicate records. In today’s blog, we’ll dive in and see the add-on in action!

The PowerMerge solution combines all information across duplicate records into one concise record. The add-on does this by using the record selected by the user as the parent record, and adding information to the fields that have not been filled out yet that are visible on a duplicate record. When merging records, fields that are already filled out on the original record will not be overwritten and duplicate records are disabled and never deleted so you can merge records with confidence.

Follow the steps below to see how easy PowerMerge makes merging records.

powermerge

Once the solution has been imported and registered into your CRM, click on the PowerPack title in the navigation bar and select PowerMerge.

powermerge
When the PowerMerge wizard opens, select the Entity and the Entity View you would like to use to clean up duplicates.

powermerge

In the latest version of the solution, users have the option to select your merge options. Here you will see these 3 options:

Default: Leaving the option as default will merge duplicates based on which record comes first in the view you’ve selected (first record in the list wins, or becomes the parent).
Original records into Latest Record: Choosing this option will merge all older records into the most recently created record (last created wins).
Latest records into Original Record: Choosing this option will merge latest created records into the first created record (first created wins).

powermerge
Lastly, select the Count Duplicate button to search how many duplicates were detected. Once you have counted the duplicates you can select Start Merging. This will begin the process of merging all duplicate records.

It’s as simple as that! With PowerMerge your organization can have clean data within minutes. PowerMerge is one of thirty-one add-ons that PowerObjects has developed to enhance Dynamics 365 functionality. Like all PowerPack add-ons, a free 30-day trial of solution is available for download directly from the PowerMerge web page.

Happy Dynamics 365’ing!

Published at Thu, 02 Aug 2018 17:29:17 +0000

{Utility} Automatic Roll-up calculator for Dynamics 365–from XrmForYou

Automatic Roll-up calculator for Dynamics 365–from XrmForYou

Frustrated about customers complaining that Roll-up fields are not calculating at runtime? Abandoned rollup fields and went for something custom because customer couldn’t afford the calculation to happen every hour? The good news is that you do not need to worry about all these any longer. The new Automatic Rollup Calculator solution from XrmForYou tackles all these scenario and does much more.

Dynamics 365 offers a wonderful UI based editor to define your roll-up fields. It’s quite powerful. However whenever we go to customer and say that roll-up fields are not calculated at run-time, it puts us in some shaky situation. Our tool does the following:

  • Identifies any changes in the child entities involved in the roll-up field definition and automatically calculates the roll-up field values
  • Handles scenario when
    • Child record is created
    • Child record is deleted
    • Child record is updated. Handles both the scenarios when associated parent of the child record is changed or the field of the child entity involved in the calculation of roll-up field is updated.
    • On-demand calculation of all roll-up fields of a record.

And all of these with just few configuration steps. So let’s see how our tool works.

For trial and pricing, please write to us at info@xrmforyou.com. Video and documentation coming soon on www.Xrmforyou.com website.

The tool comes in the form of managed solution. Once you install, it will appear in your solutions area.

Solution Name – XrmForYou.RollupfieldCalculator.

image

Open up the solution and navigate to the configuration Page. You will see a screen like the one shown below.

image

For this documentation, I have set up the following structure.

  • Created an Entity – Test Entity
  • Set-up 1:N relationship with Contact
  • Created two roll-up fields
    • Count of Contacts – Rollup field showing the number of contacts associated with the Test Entity
    • Contact Credit Limit Sum – Rollup field showing the aggregate of the credit limit field of the contacts associated with the Test Entity.

Definition of both the fields in screenshots below.

image                  image

Okay. So far so good.

I select my Test Entity from the DropDown and all the roll-up fields of the entity shows up.

image

This UI helps me pick and choose which roll-up field I want to enable for automatic calculation

I select both and click on Save Configurations button. The system will start setting the roll-up field configuration for the selected fields. You can monitor the state of the operation by going to Settings –> System Jobs

JobName – x4uru_ActionRegisterSDKStep.

image

image

If the job fails, you need to open and see the error. If the job succeeds, it will disappear from the system jobs list.

Once successful, you are all set.

For testing I create two records – “Test Record 1” & “Test Record 2”.

For both the records the roll-up fields are showing 0 which is expected.

image

I open up Test Record 1 and associated 4 contacts.

image

If I now refresh, my advanced find view, I can immediately see the roll-up fields being updated.

image

Please note that in order to avoid any performance issues, the roll-up field calculation happens through asynchronously the moment any changes are made to the child entity. Hence if your async job is stuck sometimes you may experience a bit of delay. But usually all this will happen within seconds of updating the child entity.

Now I open up any contact associated with Test record 1 and associate it with Test Record 2.

Immediately when I come back and refresh my advanced find view, I can see the results.

image

Cool. Now before I wind up, there is one more feature that the tool comes with. Once you install the solution and open up any entity form, you will see a new button in the Menu called – “Calculate Roll-up Fields”.

image

Say you don’t want to go for automatic calculation but you want the user to have an option of updating all the rollup fields on a record on-demand. You have this option which allows you to do exactly like that.

Click on the button and the dialog pops-up where you can pick and choose the roll-up fields to be updated.

image

Select the desired fields and then click on Update. The page will refresh to show the latest roll-up data.

If you believe this tool works for your organization, you can request for trial and pricing at info@xrmforyou.com.

Video and documentation will be uploaded in our website www.xrmforyou.com soon.

-Debajit Dutta

(Dynamics MVP)

Advertisements

Author: Debajit

I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side.

Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com

Author of multiple tools on codeplex including the ‘Role Based Views’ and ‘CRM-Sharepoint Metadata manager & Attachment Extractor’ which are available for commercial use under XrmForYou.com

For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

Published at Wed, 01 Aug 2018 15:38:38 +0000

Configure Currency exchange rate providers and import exchange rates automatically in Dynamics 365 for Finance and operations

Configure Currency exchange rate providers and import exchange rates automatically in Dynamics 365 for Finance and operations

Microsoft Dynamics 365 For Finance and Operations provides integration with 3 exchange rate providers out of the box.

  1. Central Bank of Russian Federation
  2. Central Bank of Europe
  3. OANDA

Depending on the country of your operations or your preference, you can use any of these providers to import currency exchange rates directly into Dynamics 365. Usually, OANDA is the widely used and most trusted exchange rate provider.

The configuration of these is pretty simple and straightforward. The integration with Central bank of Russian Federation and Central bank of Europe does not require you to setup an API key within Dynamics 365, where as for OANDA, you will need to get the API key from OANDA and set it up in Dynamics 365. OANDA also lets you do more flexible setups, such as how many decimal places you want to use, what quote type you want to use.

Lets take a quick look at how the process for setting these up and importing the exchange rates looks like.

The first thing is to setup the Currency exchange rate providers within Dynamics 365. You can do this under General Ledger > Currencies > Configure exchange rate providers form.

Exchange Rate Providers

Exchange Rate Providers Config

If you look at the default key configurations for the Central Bank of Russian Federation and Central Bank of Europe, there are pre-populated by Dynamics 365 with the Key values, which are basically the service endpoint (XML files). Screenshot below shows the configs.

Central Bank of Russian Federation

Central Bank of Europe

To demonstrate the feature, i have created 3 separate Exchange rate types for the 3 different providers.

Exchange Rate Types

Now that the exchange rate providers and exchange rate types are setup, lets ee how the import of the exchange rate works. I will first do it for the Central Bank of Russian Federation and Central Bank of Europe and then i will do the setup for OANDA feed, since that involves some additional steps.

There are 2 options of importing the exchange rates. You can trigger the import manually every time you require or you can set the process to run in batch at specified recurring intervals.

  • To initiate the import, navigate to General Ledger > Currencies > Import currency exchange rates.
  • On this screen, you can select the Exchange rate type into which you want to import the exchange rates.
  • Then select the Exchange rate provider (CBRF, CBE or OANDA)
  • You can import “As of today’s date” or you can specify a date range as well (From date and To date)
  • If you using the Central Bank of Russian Federation as the exchange rate provider, you can tell the system to automatically create the currency pairs. This is nice !
  • You can chose if you want to override existing rates also.

CBRF Import

  • Here you can setup the import process to run automatically in the background(batch) at specified recurring time intervals)

Batch Import

  • After you click OK, the import process will start and you will get a confirmation message telling what was imported.

Import Confirmation Message

  • If you are using the Central Bank of Europe as the exchange rate provider, you can additionally tell the system to prevent import on national holiday.

CBE Import

  • After the import process is complete, you will find your exchange rates in the Exchange table.

Exchange Rate Imported

  • For OANDA as your exchange rate provider, you will do some additional setup. First you will need to get a API key from OANDA. If you have a paid subscription with OANDA, you will already have a API key for exchange rates. But to test, you can just start a 30 days free trial by simply specifying your email ID. You will receive the API key in your email.

OANDA Signup1

OANDA Signup2

OANDA Signup3

  • One you have the API key from OANDA, you will need to set it up under the Exchange rate service provider configuration.

Setup API Key on Provider

  • With this setup, You are all set!!. Now the import process for OANDA is the same as we saw above for CBRF and CBE. Only thing you need to note is, with OANDA, you will need to create the currency pairs depending on how many currencies your organization operates in.
  • You can verify that the exchange rates are imported.

OANDA Import

  • You can see below that i had created 3 currency pairs (USD to INR, USD to EUR and USD to GBP) and the import process imported the corresponding exchange rates.

OANDA Imported

OANDA ER

That’s it for this post..

Advertisements

Published at Sat, 28 Jul 2018 23:45:42 +0000

[unable to retrieve full-text content]

Published at

Sharepoint Metadata Manager and Attachment Extractor–New version released!

Sharepoint Metadata Manager and Attachment Extractor–New version released!

We are delighted to announce the release of the next version of our tool – Sharepoint Attachment Extractor and Metadata Manager. For readers who are new to this tool, this tool enables you to upload documents to Sharepoint with multiple metadata as well as host of other features like

    • Allows you to create and edit Metadata related to files from CRM. This version allows up to five metadata fields per entity and also provides the option to restrict the metadata values to a specific set of values or free text.
    • Dynamic adding and removal of the SharePoint section on the form of an entity just through configuration page that comes with the tool. Also you can place the SharePoint section on multiple forms for the entity.
    • Upload up to five files at one go along with the option to enter metadata for each file. Also size limit of file not constrained by the attachment size limit in CRM
    • Automatically moving the document from the annotations section of CRM to Sharepoint.
    • Behaves in conformance with the security privileges of the user in CRM for the record on which the SharePoint section is being shown.

You can download the detailed documentation from this link – http://www.xrmforyou.com/sharepoint-integrator.html

 

For trial and pricing, please write to us at info@xrmforyou.com

 

So what’s new in Version 2.0?

1. Performance

Our team have worked greatly on the performance issues especially during metadata update and also during upload of five files with metadata. The current version is ~1.5x faster than its previous version in terms of interaction with SharePoint

2. UI in conformance with Dynamics V9.0

The entire look and feel of the Sharepoint Grid control has been revamped in conformance with the new version of CRM. The grid contains a host of features including

  • Column resizing
  • Improved Searching logic
  • Sorting
  • Paging
  • Document reload
  • Drag  & Drop

Screenshots for reference.

image

 

4

 

3

 

3. Ability to specify column ordering for metadata

The tool now comes with the capability to enable column ordering for metadata.

2

 

Untitled

 

All of this and much more to offer. Reach out to us to know how we can help you.

For trial and pricing, please write to us at info@xrmforyou.com

 

-Debajit Dutta

(Dynamics MVP)

www.xrmforyou.com

Advertisements

Author: Debajit

I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side.

Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com

Author of multiple tools on codeplex including the ‘Role Based Views’ and ‘CRM-Sharepoint Metadata manager & Attachment Extractor’ which are available for commercial use under XrmForYou.com

For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

Published at Tue, 24 Jul 2018 15:57:36 +0000

Calling bound actions (entity actions) using Xrm.WebApi.execute in Dynamics V9

Calling bound actions (entity actions) using Xrm.WebApi.execute in Dynamics V9

This is a follow up to my previous blog where I showed you how can you call a global action with all parameter types using the newly introduced Xrm.WebApi.execute method.

https://debajmecrm.com/2018/02/02/dynamics-version-9-0-execute-custom-action-with-all-parameter-types-in-dynamics-crm-version-9-0/

 

Now coming to bound actions i.e actions which are bound to entities, I was getting multiple queries on how to do it after my first blog post. Readers were telling that they are unable to call the action after repeated trials. I was perplexed. So I thought, why not give a try.

So I created a very simple action with the below details:

 

Name: new_TestProcess

Bound to entity: Account

Input Parameter – EntityReference of type custom entity named new_TestEntity

image

 

So harmless isn’t it. Even I was thinking the same till it took me more than couple of hours to figure out on how to call this action using Xrm.WebApi.execute.

So let’s dive into the code. The first thing we need to understand is how to pass the parameter for the bound entity. In other words this action will always be called on account record. And how do you pass the account record reference?

Well, the first thing that came to my mind is the input parameter must be named as “Target”. After all that is the convention created by Microsoft right? Well in-fact it’s bit different. It’s not “Target”. Then how do I find out the parameter name.

  • Settings –> Customizations –> Developer resources
  • Dowload Web Api Metadata

image

  • Once downloaded, open up the metadata in Visual studio or any other XML editor of your choice. Search for your action. In this case – “new_TestProcess”.
  • Below is my metadata for my action. See the highlighted line. From that it is clear that the bound entity parameter type is “entity” and not “Target”

image

 

Ok, past the first hurdle. Now comes my nightmare.

Highlighting Microsoft Documentation for Xrm.WebApi.execute below

image

Well, a very detailed documentation I would say. Everything is pretty much explained. But let’s shift our focus to to the highlighted line which says that for entity actions, we need to set the boundParameter to entity logical name or entity set name. Well, that’s when my ordeal started.

Started with all possible combinations like “mscrm.account”/ “Microsoft.Dynamics.CRM.Account”/”account”/”accounts” and a host of illogical others which are all ridiculous. Smile

Finally just before giving up , I started debugging and went around whichever files the browser takes me in while debugging. And finally eureka moment when I realized that you need to set the value of boundParameter to the word “entity”. Could anyone imagine that from the statement in the documentation.

And finally piece of code below for you

var target = ;

    var reqObject = ;
    reqObject.entity = target;
    reqObject.ArgEntRef =

    reqObject.getMetadata = function () , "ArgEntRef":
            }
        }
    };

    Xrm.WebApi.execute(reqObject).then(
        function (data) ,
        function (error)
        );

 

Hope this helps!

-Debajit Dutta

(Dynamics MVP)

For consultation/ training visit www.xrmforyou.com or reach out to us at info@xrmforyou.com

Advertisements

Author: Debajit

I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side.

Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com

Author of multiple tools on codeplex including the ‘Role Based Views’ and ‘CRM-Sharepoint Metadata manager & Attachment Extractor’ which are available for commercial use under XrmForYou.com

For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

Published at Fri, 20 Jul 2018 09:08:47 +0000

{knowhow} Show terms and conditions page in Dynamics 365 Portals

Show terms and conditions page in Dynamics 365 Portals

With the new version of Dynamics 365 Portals, it is now possible to enable General Data Protection Regulations (GDPR) in portals.

You can throw up company terms and conditions page when a user is authenticated to the portal. Let’s follow the below steps

To start with Navigate to Portals –>  Content Snippets

Check for the below content snippets. If its already there, don’t create. Duplicate records may lead to improper functioning.

Snippet 1:  Account/Signin/TermsAndConditionsHeading

This is the header of your terms and conditions page. I Set the value – “Custom Terms and Conditions”.

image

 

Snippet 2: Account/Signin/TermsAndConditionsCopy

This is the body of your terms and conditions  and you can place your HTML stuff in here.

image

 

Snippet 3: Account/Signin/TermsAndConditionsAgreementText

This is the text which is usually displayed beside the checkbox in the terms and condition page, usually at the bottom of the page.

image

 

Snippet 4: Account/Signin/TermsAndConditionsButtonText

The text of the button in the terms and conditions page.

image

 

Now we are done with four basic settings. However just putting in these settings won’t enable the terms and conditions for your portal. There is another site setting that you need to create if not already created.

Go to Portals –> Site Settings and create the below setting. In most of the cases it will be there already and you may just need to switch the flag from false to true. Don’t create duplicate settings

Authentication/Registration/TermsAgreementEnabled. It is a Boolean flag which indicates whether terms and conditions are enabled for your portal. Set it a value of true.

There is another site setting that you need to lookout for. Authentication/Registration/TermsPublicationDate. It’s a date value which determines from which date is the terms and conditions applicable. If any user who has logged in to the portal and he/ she has not accepted the terms and conditions after the date specified, the user would be asked to Agree the moment they sign in.

image

 

To identify when a contact has accepted the terms and conditions, there is a field in contact which captures this value. It’s called Portal Terms Agreement Date.

image

Hope this helps! Happy CRMing.

 

Debajit Dutta

(Dynamics MVP)

For training/ consulting/ utilities – please visit our website – www.xrmforyou.com or write to us at info@xrmforyou.com

Advertisements

Author: Debajit

I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side.

Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com

Author of multiple tools on codeplex including the ‘Role Based Views’ and ‘CRM-Sharepoint Metadata manager & Attachment Extractor’ which are available for commercial use under XrmForYou.com

For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

Published at Mon, 09 Jul 2018 06:18:35 +0000