Check highest privileges for entities from different Security roles assigned (including Teams Roles) to User in MS CRM

What is Issue?

User in CRM might be assigned with the different security roles directly or indirectly from Teams security role. Some time it becomes difficult to check privileges on some entity, due to number of different security roles assigned. In this cases, checking different security roles for user becomes tedious and time consuming task. You need to check each security role and each security roles for team in which user is member.

The Reason-

No direct way available to check highest privileges on entities for an user.

Solution-

you can use the tool created by mscrm16Tech as below-
It provides view of all security roles assigned directly or indirectly through Team to user.

When you install and open the application in your system you will get below window which will help you in configuration of MS CRM connection and database connection if needed.

AppScreen1

After configuring the app and clicks on OK, Select the application “Check User Privileges on Entity” in next window  –

App3Screen0

Now you need to load the available active (Enabled) users in connected CRM Organization.
You can select any user from the drop down list and get Privileges for the user.

You also have option to check security roles for entities for some publisher only(custom entities).

The output loaded in grid will show highest privileges on entities available to user cumulatively from all security security roles.

Please use below image for reference-

App3Screen1

Please follow the images to work with the app.

You can find the list of all available security roles assigned directly or indirectly through teams to user.

On click of first option in List -“Get Cumulative privileges for all Roles”  will show the all highest privileges from all the different security roles. and on click of other options in list will show the privileges for that role.

You can save this report as excel file.

You can download MSCRMTechTool Here- MSCRM16Tech Tool

Hope this will help…
Enjoy Ms CRM!!!

Follow on Facebook- FB: MSCRM16Tech

 

Generating Early Bound Classes and simple Entity Classes MS CRM

What is Issue?

While developing the CRM, when we have to go through coding part, we need to create Early-bound classes for some specific entities. But CrmSvcUtil.exe provides us the Early Bound classes for all the entities available in CRM.
Second scenario- we don’t want this much of complicated classes, Only want to add simple Entity classes. But it might become very lengthy and time consuming task to add the fields in class one by one.

The Reason-

Creating Early bound classes for particular entities is not possible using CrmSvcUtil.exe directly and creating simple entity classes is lengthy and time consuming task.

Solution-

To create early bound classe using CrmSvcUtil.exe, please refer blog – Generate Early Bound Classes for selected entities using CrmSvcUtil.exe in MS CRM

OR

you can use the tool created by mscrm16Tech as below-
It provides both the options like creating Simple CRM entity classes or to Use CrmSvcUtil.exe to generate early bound classes for selected entities only.

When you install and open the application in your system you will get below window which will help you in configuration of MS CRM connection and database connection if needed.

AppScreen1

After configuring the app and clicks on OK, Select the application “Create Early-Bound Classes” in next window  –

App2Screen0

Now you can load the available entities in connected CRM Organization. Please use below image for reference-

App2Screen In case you are using windows 10 and trying to generate Early Bound classes using CrmSvcUtil.exe, you need to make sure following feature is enabled on your windows-
>Control Panel Programs and Features – Turn Windows feature On or Off
->.NetFramework 4.8 Advanced Services
-> WCF Services
->HTTP Activation (Please enable if not)

App2Screen1

Please follow the images to work with the app.

You can download app Here- MSCRM16Tech Tool

Hope this will help…
Enjoy Ms CRM!!!

Follow on Facebook- FB: MSCRM16Tech

 

Get Excel Report or Create Database table Directly from FetchXML file

What is Issue?

The creating report or database table using complex fetchXML and getting records more than 5000.

The Reason-

It is difficult to get data directly from MS CRM without any coding or using third party tool .

Solution-

Here is the new tool created by mscrm16tech which allows you to save data in excel sheet from MS CRM or helps you to create Database table with the display names available in MS CRM. These reports and data dump minimizes the developer efforts.

When you install and open the application in your system you will get below window which will help you in configuration of MS CRM connection and database connection if needed.

AppScreen1

After configuring the app and clicks on OK, you will get below window –

AppScreen2

Please follow the images to work with the app.

You can download app Here- FetchApp by MSCRM16Tech

Hope this will help…
Enjoy Ms CRM!!!

Follow on Facebook- FB: MSCRM16Tech

 

Make CRM user friendly using Dynamics 365 CRM new features

What is Issue?

This time it is not an issue but improvement in product to make CRM user friendly. Below are the common requirements from users-

1.There is always requirement from user that they don’t want to click multiple times to go to particular window. Many times happens when user accidentally clicks on look up field which opens up the record and to get back to previous record user have to navigate many areas on sitemap. Even user clicks on back button on browser it might take much time to load window again.
2.User not able to find the opportunity pipeline stage or its status.
3. Activities in CRM hard to manage with external calendar.

The Reason-

These are the basic requirements from the users. Previously Dynamics 365 didn’t had any option to figure out these multiple click issue and single view to manage opportunities and Activities with calendar.

Solution-

With Dynamics 365 -2020 Release Wave 1 Microsoft provided some features that will help us with our above requirements –

1. Multiple clicks-
How we avoid multiple clicks-
Microsoft provided new event for lookup fields-  addOnLookupTagClick
Using this event we can perform action when click on lookup field record.
To avoid multiple clicks we can open record in popup window with all buttons and functionality available for that record without closing parent record window.
How to use addOnLookupTagClick event-

//call function onload of form with execution context passed.
function LookupDialog(executionContext) {
    var formContext = executionContext.getFormContext();
    formContext.data.entity.attributes.forEach(function (attribute, index) {
        var attributeType = attribute.getAttributeType();
        if (attributeType == "lookup") {
            var attrName = attribute.getName();
            OpenDialogForLookup(formContext, attrName);
        }
    });
}

function OpenDialogForLookup(formContext, lookupField) {
    formContext.getControl(lookupField).addOnLookupTagClick(context => {
        context.getEventArgs().preventDefault();
        const lookupTagValue = context.getEventArgs().getTagValue();
        Xrm.Navigation.navigateTo(
            {
                pageType: "entityrecord",
                entityName: lookupTagValue.entityType,
                formType: 2,
                entityId: lookupTagValue.id
            },
            {
                target: 2,
                position: 1,
                width: {
                    value: 70,
                    unit: "%"
                }
            });
    });
}

Add the LookupDialog function on load event of form so that it will add this addOnLookupTagClick  event to all lookup fields on form. So that you don’t have to add this manually for every lookup field. If you have large number of lookup field then you can call this function asynchronously on form onload event.

After clicking on lookup field you will see window like below-
NewFeatures0

You can change the position like quick create window in UCI – change position: 2
and you can change the popup window screen coverage by changing –width: {
value: 50,
unit: "%"
}
in above code.
Below is screenshot for the same-
NewFeatures2

2.Opportunity Stages and Status in single view-
Microsoft introduced the new Kanban Control

that can be used to show opportunities based on their stages or status in single view with capability to move records from one stage to another.
NewFeatures3
How to activate this feature – Click here
This will give user a better view of opportunities in his bucket.

3.Calender Control-
Microsoft also provided new calendar control to manage activities as well as some entities which sticks to the time.
NewFeatures4

This can be also activated like Kanban control above.
This will help user to easily organize activities/records with calendar.

 

Hope this will help…
Enjoy Ms CRM!!!

Follow on Facebook- FB: MSCRM16Tech

 

Call MS CRM Web API outside CRM Applicaiton or with Postman

What is Issue?

MS CRM provides out-of-box Web API which we mostly use in javascript to get data from entities whenever required. But there are many situations where your company uses different applications and CRM is one of them. The data across company can be used in any of these application in real time. So instead of writing custom Web API, if MS CRM provides out-of-box Web API, can we use that in any other application? or is it possible to call MS CRM APIs using postman for testing purpose before used in any other application?

The Reason-

MS CRM provides the way to get data from entities with calling Web API. But mostly we use this API calls within CRM application. When calling Web API within CRM , user is already logged in to the CRM which do not need any extra authorization. When we try to calls these Web API out side CRM it requires authorization to access data from CRM.

Solution-

To Call Web APIs outside MS CRM environment you need to get Bearer token for the user using OAuth2.0 authorization.

Lets take example – WebAPI to get all Accounts- https://xxxxx.crm8.dynamics.com/api/data/v8.2/accounts

Lets generate bearer token to access above WebAPI from Postman-
I am considering You have registered the Azure app and you have Client Id and Client secrete with you for this app.
In Postman- New request add your request –

    1. Go to the Authorization tab
    2. Select Type – OAuth2.0
    3. Click on Get New Access TokenPostMan0
    4. In popup window please enter all required information as below-PostMan
    5. Grant Type – Authorization Code
    6. Enter Callback URL provided in Azure App – Redirect URI
    7. Enter Auth URL –
      https://login.windows.net/common/oauth2/authorize?resource=https://xxxxx.crm8.dynamics.com
    8. Access Token URL –
      https://login.microsoftonline.com/common/oauth2/token
    9. Enter Client Id and Client Secret you have.(Azure App client details).
    10. Click on Request Token.
    11. Microsoft login window will popup. Enter your credentials to login.On successful authentication, It will bring an access token for you.
    12. Select Access Token you have generated just a while before from Available tokens in postman.
    13. Don’t forget to select Add authorization data to – Request HeaderPostMan2
    14. Now you can send the request and test your MS CRM Web APIs.
    15. You can use the Code option in postman to generate code according to your programming needs.PostMan3

You can use the same parameters when generating bearer token for the user using code.

How to get bearer token using Postman-

  1. Use Post Method and URL-
    https://login.microsoftonline.com/common/oauth2/token
  2. Add below details to Body of the request as form-data-
    – grant_type – client_credentials
    – user’s credentials : username and password
    – other details – client_id and client_secret as described above. -resource : your MS CRM url.
  3. PostMan4

Using the bearer token generated you can access MS CRM Web APIs in any application.

Hope this will help…
Enjoy Ms CRM!!!

Follow on Facebook- FB: MSCRM16Tech