CRM – 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 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-5867ffee4908a562161115/] 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
Improving CRM Online 2015’s Performance http://crmkitchen.com/improving-crm-online-2015s-performance/ http://crmkitchen.com/improving-crm-online-2015s-performance/#respond Sat, 01 Aug 2015 19:59:02 +0000 http://crmkitchen.com/?p=208 In Microsoft Dynamics CRM Online 2015 Update 1 (v7.1), a new form renderer was built to provide better performance. You might have noticed it when you open up an account or contact, two loading screen flash by (requesting data from CRM and loading business logic) just before your record is loaded. If you have heavy customizations […]

The post Improving CRM Online 2015’s Performance appeared first on CRM Kitchen.

]]>
crm online form rendering

In Microsoft Dynamics CRM Online 2015 Update 1 (v7.1), a new form renderer was built to provide better performance. You might have noticed it when you open up an account or contact, two loading screen flash by (requesting data from CRM and loading business logic) just before your record is loaded.

crm online requesting data

crm online

If you have heavy customizations on your current form, which result in the forms not behaving as intended, you can switch of the new rendering engine to diagnose the problem. Or otherwise around, if your organization is updated but is not using the new engine, you can switch it on by going to the System Settings – General Use legacy form rendering.

crm online system settings

More info :

http://blogs.msdn.com/b/crm/archive/2015/04/29/microsoft-dynamics-crm-online-2015-update-1-new-form-rendering-engine.aspx

https://koenvandevyver.wordpress.com/2015/07/16/making-dynamics-crm-faster/

The post Improving CRM Online 2015’s Performance appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/improving-crm-online-2015s-performance/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
Trigger a Workflow on CRM 2015 using C# http://crmkitchen.com/trigger-workflow-crm-2015-using-c/ http://crmkitchen.com/trigger-workflow-crm-2015-using-c/#respond Thu, 09 Jul 2015 20:24:39 +0000 http://crmkitchen.com/?p=179 If you want to run/trigger a workflow, you can execute a workflow programmatically with following request : [crayon-5867ffee5badb046343075/] Also this request is supported by Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update. Source : https://msdn.microsoft.com/en-us/library/gg309600.aspx

The post Trigger a Workflow on CRM 2015 using C# appeared first on CRM Kitchen.

]]>
If you want to run/trigger a workflow, you can execute a workflow programmatically with following request :

// Create an ExecuteWorkflow request.
ExecuteWorkflowRequest request = new ExecuteWorkflowRequest()
           {
             WorkflowId = _workflowId,
             EntityId = _leadId
           }; 
// Execute the workflow.
ExecuteWorkflowResponse response = 
(ExecuteWorkflowResponse)_serviceProxy.Execute(request);

Also this request is supported by Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update.

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

The post Trigger a Workflow on CRM 2015 using C# appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/trigger-workflow-crm-2015-using-c/feed/ 0
Save the form with Callback functions on CRM 2015 http://crmkitchen.com/save-form-callback-function-crm-2015/ http://crmkitchen.com/save-form-callback-function-crm-2015/#respond Thu, 09 Jul 2015 20:05:03 +0000 http://crmkitchen.com/?p=188 [crayon-5867ffee5beea736968745/] Saves the record asynchronously with the option to set callback functions to be executed after the save operation is completed. With Microsoft Dynamics CRM Online 2015 Update 1 or later you can also set an object to control how appointment, recurring appointment, or service activity records are processed. Open different or same entity form […]

The post Save the form with Callback functions on CRM 2015 appeared first on CRM Kitchen.

]]>

Xrm.Page.data.save(saveOptions).then(successCallback, errorCallback)

Saves the record asynchronously with the option to set callback functions to be executed after the save operation is completed.

crm-2013-client-api

With Microsoft Dynamics CRM Online 2015 Update 1 or later you can also set an object to control how appointment, recurring appointment, or service activity records are processed.

Open different or same entity form after save :

Xrm.Page.data.save().then(
    function() {
       console.log("success");
       Xrm.Utility.openEntityForm(entityname,recordId);
    },
    function(errorCode,message) {
       console.log(message);
    }
);

Reload form after save

Xrm.Page.data.save().then(
    function() {
      //save worked...
      Xrm.Page.data.refresh();
    },
    function() {
      console.log("save failed");
    }
);

window.location.reload(true); or location.reload(); or window.location = document.url;

These scripts cannot work for CRM 2013 and higher version. So you have to use callback functions after saving.

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

The post Save the form with Callback functions on CRM 2015 appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/save-form-callback-function-crm-2015/feed/ 0
How to get the type of attribute on CRM using Javascript ? http://crmkitchen.com/get-type-attribute-crm-using-javascript/ http://crmkitchen.com/get-type-attribute-crm-using-javascript/#respond Thu, 09 Jul 2015 19:48:04 +0000 http://crmkitchen.com/?p=190 getAttributeType Returns a string value that represents the type of attribute. [crayon-5867ffee650e0704783598/] This method will return one of the following string values: boolean datetime decimal double integer lookup memo money optionset string getFormat Returns a string value that represents formatting options for the attribute. This method will return one of the following string values or […]

The post How to get the type of attribute on CRM using Javascript ? appeared first on CRM Kitchen.

]]>
getAttributeType

Returns a string value that represents the type of attribute.

Xrm.Page.getAttribute(fieldname).getAttributeType();

This method will return one of the following string values:

  • boolean
  • datetime
  • decimal
  • double
  • integer
  • lookup
  • memo
  • money
  • optionset
  • string

getFormat

Returns a string value that represents formatting options for the attribute.

This method will return one of the following string values or null:

  • date
  • datetime
  • duration
  • email
  • language
  • none
  • phone
  • text
  • textarea
  • tickersymbol
  • timezone
  • url

 

Application Field Type Format Option Attribute Type Format Value
Date and Time Date Only datetime date
Date and Time Date and Time datetime datetime
Whole Number Duration integer duration
Single Line of Text E-mail string email
Whole Number Language optionset language
Whole Number None integer none
Single Line of Text Text Area string textarea
Single Line of Text Text string text
Single Line of Text Ticker Symbol string tickersymbol
Single Line of Text Phone string phone
Whole Number Time Zone optionset timezone
Single Line of Text Url string url

Source : https://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getAttributeType

The post How to get the type of attribute on CRM using Javascript ? appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/get-type-attribute-crm-using-javascript/feed/ 0
How to fix Assembly does not have a strong name for CRM ? http://crmkitchen.com/fix-assembly-not-strong-name/ http://crmkitchen.com/fix-assembly-not-strong-name/#respond Sat, 04 Jul 2015 13:35:39 +0000 http://crmkitchen.com/?p=112 Referenced assembly XXX does not have a strong name. These errors are taken in the following steps :  Deployment with CRM Package   Register the Plugin with Plugin Registration Tool   How to Sign an Assembly in Visual Studio ? With the project node selected in Solution Explorer, from the Projectmenu, click Properties(or right-click the […]

The post How to fix Assembly does not have a strong name for CRM ? appeared first on CRM Kitchen.

]]>

Referenced assembly XXX does not have a strong name.

These errors are taken in the following steps : 

  • Deployment with CRM Package
    CRM Assembly Build

 

  • Register the Plugin with Plugin Registration Tool

CRM Strong Name Signing

 

How to Sign an Assembly in Visual Studio ?

  • With the project node selected in Solution Explorer, from the Projectmenu, click Properties(or right-click the project node in Solution Explorer, and click Properties)

CRM Strong Name Signing

  • In the Project Designer, click the Signing tab
  • Select the Sign the assembly check box

CRM Strong Name Signing

  • Specify a new key file. In the Choose a strong name key file drop-down list, select New… Note that new key files are always created in the .pfx format.The Create Strong Name Dialog appears.
  • In the Create Strong Name Key dialog box, enter a name and password for the new key file, and then click OK

More info : https://msdn.microsoft.com/en-us/library/ms247123(v=vs.90).aspx

 

Why Strong Name is required for CRM Projects ?

https://social.microsoft.com/Forums/en-US/01de0856-e7a6-429b-b150-cca174eefb28/why-strong-name-key-is-required-for-plugin-in-ms-crm-40?forum=crmdevelopment

 

We recommend you that read in a very detail post on Hosk’s Dynamic CRM Blog

https://crmbusiness.wordpress.com/2014/10/01/assembly-generation-failed-referenced-assembly-does-not-have-a-strong-name/

 

The post How to fix Assembly does not have a strong name for CRM ? appeared first on CRM Kitchen.

]]>
http://crmkitchen.com/fix-assembly-not-strong-name/feed/ 0