Tip Of The Day – CRM Kitchen http://crmkitchen.com Microsoft Dynamic CRM Tue, 25 Oct 2016 14:58:06 +0000 en-US hourly 1 https://wordpress.org/?v=4.6.1 How to Restart or Shut Down a Remote Computer via Command Line ? http://crmkitchen.com/restart-shut-remote-computer/ http://crmkitchen.com/restart-shut-remote-computer/#respond Tue, 27 Sep 2016 08:18:52 +0000 http://crmkitchen.com/?p=359 Sometimes I’m not able to use the shutdown or restart function in the Start menu on server. I found it from stackoverflow and I want to put here. The following functions can help us. shutdown -r — restarts shutdown -s — shutsdown shutdown -l — logoff shutdown -t xx — where xx is number of […]

The post How to Restart or Shut Down a Remote Computer via Command Line ? appeared first on CRM Kitchen.

]]>
Sometimes I’m not able to use the shutdown or restart function in the Start menu on server.

I found it from stackoverflow and I want to put here. The following functions can help us.

  • shutdown -r — restarts
  • shutdown -s — shutsdown
  • shutdown -l — logoff
  • shutdown -t xx — where xx is number of seconds to wait till shutdown/restart/logoff
  • shutdown -i — gives you a dialog box to fill in what function you want to use
  • shutdown -a — aborts the previous shutdown command
  • shutdown -h — hibernate.

Additional options:

  • -f — force the selected action

For immideatly restart  : 

  • shutdown -t 0 -r -f

Dont forget ! You must have appropriate privileges to shut down the remote machine.

 

More info :

http://stackoverflow.com/questions/162304/how-do-i-shutdown-restart-logoff-windows-via-a-bat-file

https://technet.microsoft.com/en-us/library/cc770416(v=ws.11).aspx

The post How to Restart or Shut Down a Remote Computer via Command Line ? appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/restart-shut-remote-computer/feed/ 0
Querying Order By Link Entity with Fetch XML http://crmkitchen.com/querying-order-link-entity-fetch-xml/ http://crmkitchen.com/querying-order-link-entity-fetch-xml/#respond Mon, 26 Sep 2016 09:02:07 +0000 http://crmkitchen.com/?p=345 If you want to sort the results based from linked data, we can add order by link entity’s attribute like this : [crayon-5868056b0a853021465039/]    

The post Querying Order By Link Entity with Fetch XML appeared first on CRM Kitchen.

]]>
If you want to sort the results based from linked data, we can add order by link entity’s attribute like this :

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
  <entity name="contact">
    <attribute name="fullname" />
    <attribute name="telephone1" />
    <attribute name="contactid" />
    <link-entity name="contactquotes" from="contactid" to="contactid" visible="false" intersect="true">
      <link-entity name="quote" from="quoteid" to="quoteid" alias="aa">
		<order attribute="createdon" descending="false" />
	  </link-entity>
    </link-entity>
  </entity>
</fetch>

 

 

The post Querying Order By Link Entity with Fetch XML appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/querying-order-link-entity-fetch-xml/feed/ 0
Dynamics CRM Error : Importing Solution – Fields that are not valid were specified for the entity http://crmkitchen.com/importing-error-fields-that-are-not-valid-were-specified-for-entity/ http://crmkitchen.com/importing-error-fields-that-are-not-valid-were-specified-for-entity/#comments Tue, 11 Aug 2015 21:06:37 +0000 http://crmkitchen.com/?p=251 Fields that are not valid were specified for the entity When you try to import a solution to another environment if you get an error like this. That error is about field of incompatibility so you must find that incompatibility and delete that field from it there where you want to import For example : You have […]

The post Dynamics CRM Error : Importing Solution – Fields that are not valid were specified for the entity appeared first on CRM Kitchen.

]]>

Fields that are not valid were specified for the entity

When you try to import a solution to another environment if you get an error like this. That error is about field of incompatibility so you must find that incompatibility and delete that field from it there where you want to import

For example :

  • You have a nvarchar field in development environment and have an integer field as same fieldname in test environment.
  • new_age (string)  VS new_age (integer).

 

The post Dynamics CRM Error : Importing Solution – Fields that are not valid were specified for the entity appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/importing-error-fields-that-are-not-valid-were-specified-for-entity/feed/ 1
CRM Tips : Javascript Stop Form Saving http://crmkitchen.com/crm-tips-javascript-stop-form-saving/ http://crmkitchen.com/crm-tips-javascript-stop-form-saving/#respond Sun, 02 Aug 2015 13:45:43 +0000 http://crmkitchen.com/?p=217 If you want to control your process on save event, you can use preventDefault method. [crayon-5868056b0c00c367598019/] Dont forget to click “Pass execution context as first parameter” on Form Properties. preventDefault : Cancels the save operation, but all remaining handlers for the event will still be executed.   Save event arguments (client-side reference) https://msdn.microsoft.com/en-us/library/gg509060.aspx

The post CRM Tips : Javascript Stop Form Saving appeared first on CRM Kitchen.

]]>
If you want to control your process on save event, you can use preventDefault method.

function formOnSave(context) {

    var saveEvt = context.getEventArgs();
    if (Xrm.Page.getAttribute("fieldname").getValue() == null) {
        saveEvt.preventDefault();
    }
}

Dont forget to click “Pass execution context as first parameter” on Form Properties.

crm on save javascript

preventDefault : Cancels the save operation, but all remaining handlers for the event will still be executed.

 

Save event arguments (client-side reference)

https://msdn.microsoft.com/en-us/library/gg509060.aspx

The post CRM Tips : Javascript Stop Form Saving appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/crm-tips-javascript-stop-form-saving/feed/ 0
ExecuteMultipleRequest For Bulk Operation http://crmkitchen.com/executemultiplerequest-bulk-operation/ http://crmkitchen.com/executemultiplerequest-bulk-operation/#respond Sat, 01 Aug 2015 19:45:21 +0000 http://crmkitchen.com/?p=213 You can use the ExecuteMultipleRequest message to support higher throughput bulk message passing scenarios in Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update, particularly in the case of Microsoft Dynamics CRM Online where Internet latency can be the largest limiting factor. ExecuteMultipleRequest accepts an input collection of message Requests, executes each of […]

The post ExecuteMultipleRequest For Bulk Operation appeared first on CRM Kitchen.

]]>
You can use the ExecuteMultipleRequest message to support higher throughput bulk message passing scenarios in Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update, particularly in the case of Microsoft Dynamics CRM Online where Internet latency can be the largest limiting factor. ExecuteMultipleRequest accepts an input collection of message Requests, executes each of the message requests in the order they appear in the input collection, and optionally returns a collection of Responses containing each message’s response or the error that occurred. Each message request in the input collection is processed in a separate database transaction.ExecuteMultipleRequest is executed by using the IOrganizationService.Execute method.

  • For Online CRM, maximum Batch Size is 1000. So, for Online CRM, maximum 1000 requests can be executed at a time.
  • For On Premise, Batch Size can be increased.

 

// Create an ExecuteMultipleRequest object.
    requestWithResults = new ExecuteMultipleRequest()
    {
        // Assign settings that define execution behavior: continue on error, return responses. 
        Settings = new ExecuteMultipleSettings()
        {
            ContinueOnError = false,
            ReturnResponses = true
        },
        // Create an empty organization request collection.
        Requests = new OrganizationRequestCollection()
    };

    // Create several (local, in memory) entities in a collection. 
    EntityCollection input = GetCollectionOfEntitiesToCreate();

    // Add a CreateRequest for each entity to the request collection.
    foreach (var entity in input.Entities)
    {
        CreateRequest createRequest = new CreateRequest { Target = entity };
        requestWithResults.Requests.Add(createRequest);
    }

    // Execute all the requests in the request collection using a single web method call.
    ExecuteMultipleResponse responseWithResults =
        (ExecuteMultipleResponse)_serviceProxy.Execute(requestWithResults);

    // Display the results returned in the responses.
    foreach (var responseItem in responseWithResults.Responses)
    {
        // A valid response.
        if (responseItem.Response != null)
            DisplayResponse(requestWithResults.Requests[responseItem.RequestIndex], responseItem.Response);

        // An error has occurred.
        else if (responseItem.Fault != null)
            DisplayFault(requestWithResults.Requests[responseItem.RequestIndex], 
                responseItem.RequestIndex, responseItem.Fault);
    }

 

 

Here is another example of changing the State and Status of records by ExecuteMultipleRequest.

for (int i = 0; i < records.Entities.Count; i++)
{
    SetStateRequest setStateReq = new SetStateRequest();
    setStateReq.EntityMoniker = new EntityReference();
    setStateReq.EntityMoniker.Id = records.Entities[i].Id;
    setStateReq.EntityMoniker.LogicalName = records.Entities[i].LogicalName;
    setStateReq.State = new OptionSetValue(0);
    setStateReq.Status = new OptionSetValue(1);
    req.Requests.Add(setStateReq);
}
 
var res = service.Execute(req) as ExecuteMultipleResponse;

 

More info : https://msdn.microsoft.com/en-us/library/jj863631.aspx

The post ExecuteMultipleRequest For Bulk Operation appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/executemultiplerequest-bulk-operation/feed/ 0
CRM Deploy Error : Assembly must be registered in isolation http://crmkitchen.com/crm-deploy-error-assembly-must-registered-isolation/ http://crmkitchen.com/crm-deploy-error-assembly-must-registered-isolation/#respond Sat, 01 Aug 2015 19:32:25 +0000 http://crmkitchen.com/?p=220 When you trying to deploy plugins, if you get an Assembly must be registered in isolation error. You are not a Deployment administrator on CRM Organization. After the deployment administrator must add you as deployment administrator, you can deploy / register a plugin. Open the Deployment Manager First of all you must be a Dynamics CRM […]

The post CRM Deploy Error : Assembly must be registered in isolation appeared first on CRM Kitchen.

]]>
When you trying to deploy plugins, if you get an Assembly must be registered in isolation error. You are not a Deployment administrator on CRM Organization. After the deployment administrator must add you as deployment administrator, you can deploy / register a plugin.

Open the Deployment Manager

First of all you must be a Dynamics CRM deployment admin to access the Dynamics CRM Deployment Manager and change the Dynamics CRM URLs. If you dont have access to privileges, you can tell your administrator.

crm acces denied

 

 

Open the User Panel from Deployment Adminstrators

Right click the deployment adminstrators then click the New Deployment Adminstrator.crm deployment

 

Add a New Deployment Administrator

You can add the user who you want from Active Directory.

deployment crm microsoft

Register and Deploy Plugins

https://msdn.microsoft.com/en-us/library/gg309620.aspx

The post CRM Deploy Error : Assembly must be registered in isolation appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/crm-deploy-error-assembly-must-registered-isolation/feed/ 0
CRM 2013 Tips : How to fix Access Denied Error ? http://crmkitchen.com/crm-2013-tips-fix-access-denied-error/ http://crmkitchen.com/crm-2013-tips-fix-access-denied-error/#respond Sat, 01 Aug 2015 19:10:35 +0000 http://crmkitchen.com/?p=222 When you write javascript oData if you get an Access denied error. You have to change Web Addresses from Deployment Manager. Open the Deployment Manager First of all you must be a Dynamics CRM deployment admin to access the Dynamics CRM Deployment Manager and change the Dynamics CRM URLs. If you dont have access to privileges, you […]

The post CRM 2013 Tips : How to fix Access Denied Error ? appeared first on CRM Kitchen.

]]>
When you write javascript oData if you get an Access denied error. You have to change Web Addresses from Deployment Manager.

Open the Deployment Manager

First of all you must be a Dynamics CRM deployment admin to access the Dynamics CRM Deployment Manager and change the Dynamics CRM URLs. If you dont have access to privileges, you can tell your administrator.

crm acces denied

 

 

Open the Properties

crm access denied

 

Change Web Addresses

You have to change all 4 CRM URLs to the full FQN CRM URL (Full Qualify Domain Name).

crm access denied deployment

 

More info : http://www.dynamicscrmpros.com/microsoft-dynamics-crm-2011-access-denied-error-resolved/

 

The post CRM 2013 Tips : How to fix Access Denied Error ? appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/crm-2013-tips-fix-access-denied-error/feed/ 0
Dynamics CRM 2013 Developer Toolkit for Visual Studio 2013 http://crmkitchen.com/dynamics-crm-2013-developer-toolkit-visual-studio-2013/ http://crmkitchen.com/dynamics-crm-2013-developer-toolkit-visual-studio-2013/#respond Tue, 30 Jun 2015 15:14:50 +0000 http://crmkitchen.com/?p=85   Normally there is no CRM Developer Toolkit installation file for Visual Studio 2013. But you can install it with some customization. Firstly Download the installation files. Open Visual Studio folder and Run Microsoft.CrmDeveloperTools.vsix file Run the crmSDKFix.reg file Copy contents of the CRM MSBuild folder to “C:\Program Files\MSBuild\Microsoft\CRM” or “C:\Program Files (x86)\MSBuild\Microsoft\CRM” If there is no CRM […]

The post Dynamics CRM 2013 Developer Toolkit for Visual Studio 2013 appeared first on CRM Kitchen.

]]>
 

Normally there is no CRM Developer Toolkit installation file for Visual Studio 2013. But you can install it with some customization.

s2

  • Firstly Download the installation files.
  • Open Visual Studio folder and Run Microsoft.CrmDeveloperTools.vsix file
  • s3
  • Run the crmSDKFix.reg file
  • Copy contents of the CRM MSBuild folder to “C:\Program Files\MSBuild\Microsoft\CRM” or “C:\Program Files (x86)\MSBuild\Microsoft\CRM”
  • If there is no CRM folder in MSBuild folder, you can create this CRM folder.
  • Now open Visual Studio and you can create CRM Toolkit Project.

The post Dynamics CRM 2013 Developer Toolkit for Visual Studio 2013 appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/dynamics-crm-2013-developer-toolkit-visual-studio-2013/feed/ 0
(Resolved) CRM Explorer not showing up on Visual Studio http://crmkitchen.com/resolved-crm-explorer-not-showing-visual-studio/ http://crmkitchen.com/resolved-crm-explorer-not-showing-visual-studio/#respond Tue, 30 Jun 2015 14:53:09 +0000 http://crmkitchen.com/?p=94 If you cannot find CRM Explorer in the Tools menu, you can fix the issue like that. Close the Visual Studio Project Open the Project’s Solution file (.sln) in a text edior Find the Global section and insert the following code at the beginning of the section. [crayon-5868056b13ec2618074076/] Save the file and open your project […]

The post (Resolved) CRM Explorer not showing up on Visual Studio appeared first on CRM Kitchen.

]]>
s1
If you cannot find CRM Explorer in the Tools menu, you can fix the issue like that.

  • Close the Visual Studio Project
  • Open the Project’s Solution file (.sln) in a text edior
  • Find the Global section and insert the following code at the beginning of the section.

GlobalSection(CRMSolutionProperties) = preSolution
        SolutionIsBoundToCRM = True
    EndGlobalSection

  • Save the file and open your project again.
  • Now you can find the CRM Explorer in the Tools Menu or Connect to Dynamics CRM Server dialog will show up automatically.

The post (Resolved) CRM Explorer not showing up on Visual Studio appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/resolved-crm-explorer-not-showing-visual-studio/feed/ 0
CRM Tips : Where is the Advanced Find for CRM 2015 ? http://crmkitchen.com/crm-tips-where-is-advanced-find-crm-2015/ http://crmkitchen.com/crm-tips-where-is-advanced-find-crm-2015/#respond Mon, 29 Jun 2015 12:46:09 +0000 http://crmkitchen.com/?p=82 In CRM 2013 Advanced Find was not on every page, so if you were on an individual record you had to navigate back to a grid view or a dashboard to open it. Then navigate back to the record you were on. With CRM 2015 the Advanced Find button is now available from all pages […]

The post CRM Tips : Where is the Advanced Find for CRM 2015 ? appeared first on CRM Kitchen.

]]>
In CRM 2013 Advanced Find was not on every page, so if you were on an individual record you had to navigate back to a grid view or a dashboard to open it. Then navigate back to the record you were on.

microsoft-crm-advanced-find

With CRM 2015 the Advanced Find button is now available from all pages in its new home in the navigation bar at the top of every page.

Details : http://cargas.com/blog/microsoft-crm-2015-universal-search-advanced-find-improvements/

The post CRM Tips : Where is the Advanced Find for CRM 2015 ? appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/crm-tips-where-is-advanced-find-crm-2015/feed/ 0