Thursday, February 4, 2016

Only the Deployment Administrators are able to use Deployment Manager. You are not a Deployment Administrator

A few days back I come up with following error while accessing the Microsoft Dynamics CRM Deployment Manager on the server

Only the Deployment Administrators are able to use Deployment Manager. You are not a Deployment Administrator.

After spending a few hours, I found directions and fortunately added myself as to Deployment Administrator group.

To try this you just needed access of MSCRM_CONFIG

-- Get Deployment Administrators
SELECT Name, IsDisabled, Name, IsDeleted
FROM [MSCRM_CONFIG].[dbo].[SystemUser]
WHERE DefaultOrganizationId ='00000000-0000-0000-0000-000000000000'


-- Get guid of security roles Administrator
SELECT  Id, [Name], [UniqueifierId] 
FROM [MSCRM_CONFIG].[dbo].[SecurityRole]  
WHERE ((([Name] = 'Administrator')) ) AND (IsDeleted = 0)


-- insert into deployment administrator group
INSERT
INTO [MSCRM_CONFIG].[dbo].[SystemUser](Name, IsDeleted, DefaultOrganizationId, Id, IsDisabled) 

VALUES ('domain\user', 0, '00000000-0000-0000-0000-000000000000', NEWID(), NULL)

--Give security role to user added before
INSERT
INTO [MSCRM_CONFIG].[dbo].[SystemUserRoles](Id, SecurityRoleId, SystemUserId, IsDeleted)
VALUES (NEWID(), 'Administrator GUID', 'User GUID', 0)


 Enjoy!

Wednesday, July 29, 2015

How to set header field value in Dynamics CRM form?



Setting the header field values is not supported in xrm. So, we must move to unsupported ways to set the value of the fields added in header.
Following code snippet will help us to achieve the goal.

document.getElementById("header_xxx_d").childNodes[0].innerText = value;

In the above code snippet, replace xxx with your field name that exists in the header and value with your value you need to set.

But it'll not save in the database. To achieve this you should add a hidden field on  the form and set its value when you are setting value for the header field and then at  on-load event again get the value and assign to the above code snippet.

Cheers!


Tuesday, July 28, 2015

How to Enable/Disable a custom button for specific roles in Dynamics CRM??



I just came across with an urgent requirement to add a custom button in to main ribbon and then enable it if user has CSR Manager Role and disable in other case. It can be done through many ways as you can find multiple blogs posts written on it. But I found a simplest way to do it.
Here it is:
  1. Find guid of CSR Manager Role using the following code:

    function CheckUserRole(){
    //get guid of all assigned roles
    var currentUserRoles = Xrm.Page.context.getUserRoles();
    for (var i = 0; i < currentUserRoles.length; i++) {
            
    var userRoleId = currentUserRoles[i];
             //alert to each role
           
    alert(userRoleId);
    }   
    return false;
    }
  2.  In the following code, I’m checking if array contains the guid of a CSR Manager Role

    function ifCSRManager() {
    //get  guids of the roles assigned to user
    var currentUserRoles = Xrm.Page.context.getUserRoles();
    //check if it contains the guid of CSR Manager
    if (currentUserRoles.indexOf("1117f744-a5bd-e411-8c0a-005056b04acd") > -1)
     
    {    return true;}
    return false;
    }
Now, in ribbon workbench just add custom javascript role in enable rule and then tie it with command of the button.

Step # 1: Add new Enable Rule


Step # 2: Right click on the rule and then Edit Rule 

Step # 3: Select Custom Javascript Rule and click OK 

Step #4: Give Function Name and Library that contains function and click OK 
Step # 5: Add this rule to the command tied with your custom button and publish solution.




Friday, July 10, 2015

How to use XRM Service Toolkit in Microsoft Dynamcis CRM Forms??

XrmServiceToolkit is a JavaScript library which can be used for JavaScript Development under the platform for Microsoft Dynamics CRM 2011/2013/2015 environments. The library contains four major parts regarding functions.Like, General Methods used for various purpose,Rest, Soap and other jQuery extension to utilize WebResource to extend CRM 2011 / CRM 2013 / CRM 2015 including dependent OptionSet, field tooltip, add custom filter view to lookup field.

How to use the XRM Service Toolkit
  1. Download toolkit from here
  2. Extract the downloaded zip.
  3. Open the solution in Microsoft Dynamics CRM
  4. Create New web resource give its ‘Name’, ‘Display Name’, Select the ‘Script(JScript)’ from Type and then browse for the jQuery file that comes with the XRM Service Tool Kit
  5. Create two more web resource for json and XRMServiceToolKit, by repeating the step ‘4’
  6. Add all these web resources to a form in the following order:
    i. jQuery
    ii. jSon
    iii.XrmServiceToolkit
    iv.Your web resource library

Enjoy!

Thursday, April 11, 2013

How to create new lead in MS dynamics CRM 2011?

Hello every one, today we are going to create our firs lead  in Microsoft Dynamics CRM 2011. So let we first go for the introduction to the lead.

Introduction to lead.

Lead:

in MS Dynamics CRM 2011 and MS Dynamics CRM 2011 the lead is identify by the specific information about the products or services offered by a person or company  to whom, interested in receiving those information.

Origin: 

the origin of the lead the salesperson that provide the information to the lead using some sort of communication media like email.

Use:

 to track contacts or accounts that are potential customers, but who have not yet been qualified.
The data for the lead is kept separate from customer and opportunity until the lead is qualified. The possible states for the leads are open, qualified and disqualified. A qualified lead may be converted to Contact, Account and Opportunity.

Step by step to create lead.

Step 1:   


After login to the MS Dynamics CRM 2011 click on the workplace, select Lead from the navigation and then click on the New in the top nav. As shown into the following figure.


Step 2:

After click on the New button mentioned in the step one you will be lead to the following form to give some sort of information. As in the following:

















I have put the information in the form that are necessary which are red colored. for the blue colored information you are free to either enter or not. And press save for only save and press Save & Close for allowing the system to save and close the form.

Step 3:  

 
Following selected is our created lead













theses were the simple steps to create the lead in Microsoft Dynamics CRM 2011.