Fixing “Description name must be specified Parameter name: description” Error

We may get this error while deploying workflow assembly using Developers toolkit if we missed to fill description field while adding new Workflow Activity Class.

2015-02-22_12-29-51

We can fix this error using following steps:

  • Navigate to workflow project properties (Right Click on workflow project ->Select Properties)
  • Select Application tab and click on Assembly Information button
  • Fill information under Description field
  • Build try to Deploy your solution again

2015-02-22_12-36-14

But we may still get this error if RegisterFile.crmregister file is not updated automatically, so we may need to update this file manually by adding Description property like below, now we should be able to deploy our workflow solution without any issue.

2015-02-22_12-54-31

HIMBAP | Need any help in Microsoft CRM 2015 Contact US !!

Leave a comment

Filed under MS CRM 2013

Creating html web resource to show image attached in Notes Part 2

In our previous post we explained how we can get image from notes using OData endpoints, in this post we are going to explain how we can create html web resource and use our java script method to get and display image. We need to implement two steps:

  •   Create html page
  •   Deploy html page and SDK.REST.js using web resource

Create html page

Create html page using any html editor, use following code for html page

<html lang=”en-us”><head>
<script src=”../ClientGlobalContext.js.aspx”></script>
<script type=”text/javascript” src=”SDK.REST.js”></script>
<script type=”text/javascript”>
//check if document is loaded or not
var imgControl = document.createElement(“IMG”);
//Check if documented loaded fully
document.onreadystatechange = function () {
if (document.readyState == “complete”) {
getnotesImages();
}
}
//this function is used to get image from notes
function getnotesImages()
{ //get regarding object id
var regardingObjectId=window.parent.Xrm.Page.data.entity.getId();
//assign notes entity name
var entitySchemaName=”Annotation”;
var odataQuery = “?$top=1&$select=AnnotationId,DocumentBody,MimeType&” +
“$filter=ObjectId/Id eq guid'” + regardingObjectId +
“‘ and IsDocument eq true and startswith(MimeType,’image/’) “;
//call retrieveMultipleRecords method in SDK.REST javascript script library
SDK.REST.retrieveMultipleRecords(entitySchemaName, odataQuery, getnotesImagesCallback, function (error) { alert(error.message); }, function(){});
}
//process callbanck result
function getnotesImagesCallback(resultSet)
{
if (resultSet.length > 0) {
var mimeType = resultSet[0].MimeType;
var body = resultSet[0].DocumentBody;
imgControl.src=”data:” + mimeType + “;base64,” + body;
document.getElementById(‘imagediv’).appendChild(imgControl);
}
}
</script>
<meta charset=”utf-8″></head><body style=”zoom: 1;”>
<div style=”width: 100px;” id=”imagediv”></div>
</body></html>

Deploy html page and SDK.REST library using web resource

Using following steps to deploy html page and SDK.REST library in MS CRM.

  •       Navigate to Settings -> Customization-> Customize the System from top navigation bar
  •       Navigate to Components -> Web Resources-> New
  •       Fill details like following screen

saveimg

  • Click on browse button and select your html web resource.
  •        Click on Save and then Publish
  •        Navigate to Components -> Web Resources-> New
  •        Fill details like following screen

sdk.rest

  • Click on browse and select SDK.REST.js from MS CRM SDK

Note: Please refer previous post for SDK.REST.js location.

Now we can place our html web resource in the account entity form by navigating Insert  -> Web Resource options. Save your changes and then publish account entity form.

form

When you will try to open your account record you should be able to see attached images loaded into html web resource.

img

HIMBAP | Need any help in Microsoft CRM 2015 Contact US !!

Leave a comment

Filed under MS CRM 2011, MS CRM 2013, MS CRM 2013 Web Resource, MS CRM 2015

Creating html web resource to show image attached in Notes Part 1

Microsoft Dynamics CRM 2013 introduced new entity image feature, so we can have one image attribute and can use that to store entity image. But we can have only one image attribute per entity. So in this article we are going to demonstrate how we can build an image slider using the java script.

Microsoft Dynamics CRM store all the notes and attachment in annotation entity. Most of the out of box entity used to have relationship with this entity, but while creating our custom entity we can specifically select if we want to associate our custom entity with notes or not using following option under Communication & Collaboration. Keep in mind once you enable this option, there is not supported way to disable this option, but if you are not sure, if you need notes or not at the time of your entity creation better to leave this option un-selected, so that you can select this option after sometime if required.

notesoption

Note: The default size for notes attachment is 5 MB but if required you can increase this limit up to 32 MB.

For our demo purpose we are going to use account entity which already have relationship with notes entity. We will utilize attachment feature to attach image and use that in our html web resource for display. So basically we are going to implement below steps

  •     Get entity image from notes
  •     Create and deploy html web resource.

Get entity image from notes

We can attach image in notes using social pane in Microsoft Dynamics CRM 2015, like following screen.

attachimage

Once image is attached to notes, we can retrieve it using OData or Soap endpoint, we are going to use OData endpoints in this article. To retrieve data from notes we need to query annotation entity based on ObjectId field, that we can get entity id using getId method. We need to write retrieve multiple call to get image record, we can use SDK.REST.js java script library that comes with MS CRM SDK and call it’s retrieveMultipleRecords method to get data based our query. Please download MS CRM SDK to get details about this library and it’s method.

function getnotesImages()
{ //get regarding object id
var regardingObjectId=window.parent.Xrm.Page.data.entity.getId();
//assign notes entity name
var entitySchemaName=”Annotation”;
var odataQuery = “?$top=1&$select=AnnotationId,DocumentBody,MimeType&” +
“$filter=ObjectId/Id eq guid'” + regardingObjectId +
“‘ and IsDocument eq true and startswith(MimeType,’image/’) “;
//call retrieveMultipleRecords method in SDK.REST javascript script library
SDK.REST.retrieveMultipleRecords(entitySchemaName, odataQuery, getnotesImagesCallback, function (error) { alert(error.message); }, function(){});
}
//process callbanck result
function getnotesImagesCallback(resultSet)
{
if (resultSet.length > 0) {
var mimeType = resultSet[0].MimeType;
var body = resultSet[0].DocumentBody;
imgControl.src=”data:” + mimeType + “;base64,” + body;
document.getElementById(‘imagediv’).appendChild(imgControl);
}}

Note: You can download latest CRM SDK from here and find SDK.REST.js under SDK\SampleCode\JS\RESTEndpoint\JavaScriptRESTDataOperations\JavaScriptRESTDataOperations\Scripts.

Stay tuned for our next post to create and deploy html web resource using above method to get and display image.

HIMBAP | Need any help in Microsoft CRM 2015 Contact US !!

Leave a comment

Filed under MS CRM 2011, MS CRM 2013, MS CRM 2015

Microsoft CRM 2015 Upgrade Requires CRM 2013 SP1

Originally posted on Microsoft Dynamics CRM Online Blog:

I’m currently working on a Microsoft Dynamics CRM 4.0 upgrade to Dynamics CRM 2015 project. That is 3 versions upgrade (4.0 >> 2011 >> 2013 >> 2015). A lot of folks asked me should they upgrade to 2013 or 2015 given that 2015 was just released – November 2014. Unless there is something that only 2013 offers then I would go with 2015 in a HEART BEAT!

One thing to note during the upgrade process – the final upgrade to CRM 2015 requires the CRM 2013 organization to be updated with CRM 2013 Service Pack 1 otherwise you will receive the following message:

image

The above message originated from our Microsoft CRM 2015 Upgrade Test environment where we had imported the CRM 2013 Organization to it. I want to stress the importance of parallel upgrade test environments while keeping the CRM 4.0 Production environment intact.

Contact me if you…

View original 22 more words

Leave a comment

Filed under Uncategorized

What is OOB feature?

This a common question that we used to face during CRM training sessions, while we explain what are the OOB features in Dynamics CRM, so we thought of writing a quick blog on this. If you will try to search definition “out of box feature” in Wikipedia you will get below answer

An out of the box feature or functionality, particularly in software, is a feature or functionality of a product that works immediately after installation without any configuration or modification.

Every software provides some set of feature without any configuration and in the similar way Dynamics CRM provides you rich set of OOB features which is available without any customization and configuration, you can access these features as soon as you will setup your CRM on premise deployment or online account.

DynamicsCRMoutbox

Following are the high level out of box features of Microsoft Dynamics CRM 2015

  • Multiple deployment options (online, on premise and hosted
  • Multiple client supports (web, outlook and mobile/tablet)
  • Rich product develop platform capabilities (xRM)
  • Packaging, versioning and Deployment support for your customization & extension
  • Business entities to handle sales, marketing and service process.
  • Capturing interaction with client using activities (email, phone call, custom..)
  • User & Security management
  • Business automation tools (workflow, dialogs, action, business process flow)
  • Rich data management support (import/export, duplicate check, bulk delete)
  • Integration support (Web service and SDK APIs)
  • Reporting features (multiple reports available for all modules)
  • Rich BI support (Dashboard and Charts)
  • Integration with Outlook, Share Point, Yammer, Exchange, Social media, Lync & Skype
  • Highly extendable

The other question that comes right after this – What we need to setup our infrastructure and install CRM server?? The simplest answer is we don’t really need to install CRM to enjoy these OOB features, you can simply setup online 30 days online trail which will setup a trial MS CRM 2015 online organization. But if you want to setup your own CRM server you can download Microsoft Dynamics CRM 2015 Implementation Guide, which will help you with complete step by step instruction to setup your own on premise server.

HIMBAP | Need any help in Microsoft CRM 2015 Contact US !!

Leave a comment

Filed under MS CRM 2015

Business Rules Enhancement in MS CRM 2015

With other exciting features, Microsoft Dynamics CRM 2015 also introduced new following enhancement in business rules:

  • Set default value
  • Support for Server Side logic
  • Support for OR operator
  • Support for else

Setting Default Value – This is a very useful enhancement which can help us in different business scenarios for example, let’s say you have one default pricelist that you want to set in opportunity, earlier we used to write retrievemultiple call to set default pricelist based on it’s name. But now we can simply design business rule to set default price list

SettingDefaultPricelistii

Once activated, it will set default pricelist when opportunity record is created.

pricelist

This is especially useful to set some default value to required fields automatically.

Support for Server Side logic – Initially business rules released for client side validation, but Microsoft Dynamics CRM 2015 added support to run these validation on server side as well, so now we can configure our business rule to run both client and server side. A new scope “Entity” is added in business rules designer which enables to run our business logic at server side as well, let’s take above example and activate it using Entity scope. Like below

setdefaultpricelst1

Now let’s create opportunity using code, like below

private void Businesslogicdemo(IOrganizationService iorganizationService)

{

//Create entity class object and pass entity name

Entity opportunityEntity = new Entity(“opportunity”);

//call create method to create opportunity

iorganizationService.Create(opportunityEntity);

}

Please note we are not adding any attribute value, but as soon as this code is executed it will also run our business logic and our default values will be available in opportunity record like following

advancefind

Support for OR operator – Now business rule also supports OR logical operator, so we can have two condition and we can use And/OR logical operator between these conditions based on requirement.

Support for else – This is another new enhancement in business rules, earlier there was no support for else, so if you want to make any field required based on some condition in MS CRM 2013, you need to create two business rule one to make that required and another to make that field not required, but in MS CRM 2015 we can simply add else statement.

else

HIMBAP | Need any help in Microsoft CRM 2015 Contact US !!

6 Comments

Filed under MS CRM 2015

eBook Bonanza by Packt !!

Packt started eBook Bonanza from today until 6thJan 2015, customers will be able to buy any eBook or Video from the Packt website for just $5!

5-dollar-promo

Enjoy your reading !!

Leave a comment

Filed under MS CRM Book