"тнιѕ вℓσg ¢συℓ∂ ѕανє уσυя мσηєу ιƒ тιмє = мσηєу" - ∂.мαηנαℓу
Showing posts with label CRM 2013. Show all posts
Showing posts with label CRM 2013. Show all posts

Thursday, 14 November 2013

Form Notification in CRM 2013 using Javascript OR How to Display Form Level Notifications in CRM 2013 using Javascript

For Field Level Notifications, please refer the below post.


Form Notification is an interesting feature in CRM 2013.

Syntax:
Xrm.Page.ui.setFormNotification(message, level, uniqueId);
message- string
uniqueId- string
level - string, possible values are given below.
Following are the 3 possible form notifications ( Called Levels )
 ( CRM 2013 SDK )
  • ERROR : Notification will use the system error icon.
  • WARNING : Notification will use the system warning icon.
  • INFO : Notification will use the system info icon.
Lets try to understand this with a sample scenario. And later you could make changes as per your scenario.

Scenario: We have Credit limit and Annual revenue fields on the Account form. If the user enters a credit limit value greater than annual income and try to save the form, we need to notify the user with a message that the credit limit shouldn't cross the Annual revenue value. 

Here is the js code to display a 'Warning' notification.

function onSaveSetCreditLimitFormNotification()
{
var annualRevenue=Xrm.Page.getAttribute("revenue").getValue();
var creditLimit= Xrm.Page.getAttribute("creditlimit").getValue();

if(creditLimit > annualRevenue)
{
Xrm.Page.ui.setFormNotification("Sorry, Credit Limit should be less than the Annual Income","WARNING","CreditlimitMessage");

}
else
{
Xrm.Page.ui.clearFormNotification("CreditlimitMessage");

}

}

In this case, we would call the function on the Onsave event of the form ( Account )

We need to include this code in a Webresource file and make the function call as shown below.




Save the form and  Publish it.The next step is to test the results.


So we got the warning notification as shown. And notification gets cleared for the right value.


Similarly we could have info notification

Xrm.Page.ui.setFormNotification("Sorry, Credit Limit should be less than the Annual Income","INFO","CreditlimitMessage");

For which we gets the below info notifcation.


Error notification is also possible as show below.

Xrm.Page.ui.setFormNotification("Sorry, Credit Limit should be less than the Annual Income","ERROR","CreditlimitMessage");




Wednesday, 13 November 2013

Ribbon Editor for CRM 2013 OR Ribbon Customization in CRM 2013 using tool

As you all know, Ribbon customization has got a great significance in CRM 2013 as well.

I would like to recommend the following Ribbon Customization tool. Please note that I haven't tried all scenarios but got good outcomes for the customization that I tried with this tool.

It provides a good overview of the Ribbon structure in CRM 2013. In my opinion its a nice tool.

The installation and short demo could be found in the below link. Also you could find the Ribbon Workbench download links.

Ribbon workbench by Scott Durow -- "http://www.develop1.net/public/page/Ribbon-Workbench-for-Dynamics-CRM-2011.aspx"

( Ref: http://www.develop1.net/public/page/Ribbon-Workbench-for-Dynamics-CRM-2011.aspx)

Tuesday, 5 November 2013

CRM 2013 - Supported Browsers and Mobile Devices

CRM 2013 - Supported Browsers and Mobile Devices

( Ref :  Implementation guide from http://msdn.microsoft.com/en-us/dynamics/crm/dn451296 )

"Users can access the Microsoft Dynamics CRM web application on the most recent versions of the following browsers:

·      Internet Explorer on Windows

·      Firefox on Windows

·      Safari on Mac OS X

·      Chrome on Windows or Google Nexus 10

For a mobile device, such as an iPad or smartphone, the following apps are available:

·      Microsoft Dynamics CRM for iPad

·      Microsoft Dynamics CRM for Windows 8"

Saturday, 2 November 2013

What's new in CRM 2013 OR New Features in CRM 2013

Here is a list of some of the cool features in CRM 2013.

Quick View Forms in CRM 2013 --http://crmorion.blogspot.com/2013/10/quick-view-forms-in-crm-2013-or-how-to.html

Quick Create Forms in CRM 2013-- http://crmorion.blogspot.com/2013/10/quick-create-forms-in-crm-2013-or-how.html

Business Rules in CRM 2013 --http://crmorion.blogspot.com/2013/10/business-rules-in-crm-2013-or-how-to.html

Business Process Flows in CRM 2013 -- http://crmorion.blogspot.com/2013/10/process-guidance-in-crm-2013-or.html

Entity Images in CRM 2013 --http://crmorion.blogspot.com/2013/10/entity-image-in-crm-2013-or-image.html

Autosave feature in CRM 2013--http://crmorion.blogspot.com/2013/10/autosave-feature-in-crm-2013-or-how-to.html

Phone Numbe format in CRM 2013-- http://crmorion.blogspot.com/2013/10/phone-number-format-in-crm-2013-or-how.html

Lync Calls in CRM 2013 OR Click to Call feature in CRM 2013-- http://crmorion.blogspot.com/2013/10/lync-calls-from-crm-2013-or-how-to-make.html

Skype Calls in CRM 2013 OR Click to call feature in CRM 2013-- http://crmorion.blogspot.com/2013/10/skype-calls-from-crm-2013-or-how-to.html


How to get the Current User Id in CRM 2013 using javascript

Here is the javascript code snippet to retrieve the current user id in CRM 2013.

var userId = Xrm.Page.context.getUserId();

(Ref : CRM 2013 SDK )

How to get the Id of the Current Record in CRM 2013 using javascript

With reference to CRM 2013 SDK, here is the code snippet to retrieve the id of the current record in CRM 2013 using javascript.

var recordId = Xrm.Page.data.entity.getId();

Wednesday, 30 October 2013

How to Show / Hide a Field / Control in CRM 2013 using javascript

With reference to CRM 2013 SDK,

Syntax:

Xrm.Page.getControl(arg).setVisible(bool)

For instance,
Xrm.Page.getControl("creditlimit").setVisible(true);
creditlimit is the attribute name

How to Set Requirement Level in CRM 2013 using javascript OR Required, Recommended Setting in CRM 2013 using javascript

In CRM 2013, we could set the requirement level on the attribute using javascript.
 
Syntax:
Xrm.Page.getAttribute(arg).setRequiredLevel(requirementLevel)
requirementLevel property could have any of the following 3 values.
  • none
  • required
  • recommended
( Ref: CRM 2013 SDK)
For instance,
Xrm.Page.getAttribute("creditlimit").setRequiredLevel("required");

Field Level Notification in CRM 2013 using javascript OR Control Level Notification in CRM 2013 using javascript

Version used for this post: CRM 2013 Online Trial

In CRM 2013, we could provide custom field level notifications. Lets see how could we do this. Please note that field level notification could be achieved using business rules as well. 
Please refer the post :http://crmorion.blogspot.com/2013/10/business-rules-in-crm-2013-or-how-to.html

Scenario: We have Credit limit and Annual revenue fields on the Account form. If the user enters a credit limit value greater than annual income, we need to notify the user with a message that the credit limit shouldn't cross the Annual revenue value. 

So we are going to do this using javascript.

Well, lets listen to CRM 2013 SDK for a moment.

"setNotification
Display a message near the control to indicate that data is not valid. When this method is used on Microsoft Dynamics CRM for tablets a red "X" icon appears next to the control. Tapping on the icon will display the message." ( Ref: CRM 2013 SDK ) 

Nota Bene: Setting a notification on a control will block the form from saving. 

This means that if there is a notification, the user needs to resolve it first and then he / she would be able to save the form.

1. Firstly we need to define a javascript function in web resource. Either we could go to Solution ( Default solution ) --> Webresource --> Add web resource OR Update in an existing web resource  OR Navigate to Account Form and then choose the field Credit Limit-->Field Properties--> Events -- > Add OR Modify Form Library

Account Form



Credit Limit Field




2. Here is the Javascript code. And its not a hard nut to crack




For our convenience, let's copy the code here

function SetCreditLimit()
{
var annualRevenue=Xrm.Page.getAttribute("revenue").getValue();
var creditLimit= Xrm.Page.getAttribute("creditlimit").getValue();

if(creditLimit > annualRevenue)
{
Xrm.Page.getControl("creditlimit").setNotification("Sorry, Credit Limit should be less than the Annual Income");
}
else
{
Xrm.Page.getControl("creditlimit").clearNotification();
}

}


Please note the key functions used in this javascript code.

setNotification - To display a notification about a control

clearNotification - To remove the notification about a control

In this scenario, we would like to have notification if the credit limit is more than the annual revenue otherwise we do not want to display any notification.

creditlimit and revenue are the field names.

After adding the js code, Save the webresource content.

3. The next step is to call this function on the onchange event of Credit limit field.




4. Next is our no-brainer, Press OK, Save the form and publish the form.

5. Now lets pick up a sample account to test. Please note the annual income value on it.



6. Lets key in some value in the Credit limit field and test the result. In this case, we could see a red X and if we move the cursor on it then we could see the message as shown below.



7. Also lets try to key in a value which is less than the annual income.



8. As we could see, there is no notification in this case and the user could save the record.

Saturday, 19 October 2013

CRM 2013 app for Tablets

The following link from Microsoft Customer Center provides us the relevant information about the CRM 2013 app for tablets ( for windows 8 users and iPad users).

"http://www.microsoft.com/en-US/dynamics/crm-customer-center/crm-for-tablets-information-for-end-users.aspx"

( Ref: Microsoft Dynamice CRM 2013 Customer Centre)

Getting Ready for Dynamics CRM 2013 Release

As you all know we are getting closer to the Dynamics CRM 2013 Release. Microsoft has provided all relevant information about the CRM 2013 release. In the below link, you could find

  • Microsoft Dynamics CRM 2013 Global Premiere Event details
  • Many useful ebooks such as new features, pricing info etc.

( Ref: Microsoft Dynamice CRM 2013 Customer Centre)

Saturday, 12 October 2013

Microsoft Dynamics CRM 2013 Report Authoring Extension (with SQL Server Data Tools support)

CRM 2013 Report Authoring Extension is useful when we need to develop custom fetch xml based reports using Business Intelligence Development Studio.

Microsoft Dynamics CRM 2013 Report Authoring Extension (with SQL Server Data Tools support) could be downloaded from the below link.

http://www.microsoft.com/en-us/download/details.aspx?id=40343

Microsoft Dynamics CRM 2013 Helpful Resources


CRM 2013 helpful resources, all in one place. ( Training , downloads, free trials, implementation ) . Highly recommended !

https://curah.microsoft.com/31635/microsoft-dynamics-crm-2013-helpful-resources


Friday, 11 October 2013

Microsoft Dynamics CRM 2013 Custom Code Validation Tool

Well, CRM 2013 SDK explains it in the best way.

"The Microsoft Dynamics CRM 2013 Custom Code Validation Tool is a managed solution that you can install and run to inspect your web resources for issues that might cause your scripts to break with this release. This is a valuable resource to assist in locating potential problems" ( Ref : CRM 2013 SDK )

CRM 2013 Custom code validation tool could be downloaded from the following link.

http://www.microsoft.com/en-us/download/details.aspx?id=30151

Thursday, 10 October 2013

Notes in CRM 2013


Notes in CRM 2013 are a bit more cooler than notes in CRM 2011. Lets have a quick walk-through

1. Our no-brainer is here -  Account record.



2. Lets create a sample note. We need to provide a title and then notes ( in CRM 2011, the title of notes was automatically populated) .  As before, we also have the option to attach a file to the note.


3. Please note that we have the options to remove notes / attachments quickly. Also CRM  displays who created the notes and when it was created. Editing an existing notes is also very easy. Its nothing but inline editing. It could be done by just clicking on it.


Wednesday, 9 October 2013

Quick Create Forms in CRM 2013 OR How to display Quick Create Form for Custom Entities in CRM 2013

Version used for this post : CRM 2013 Online trial


For Quick View Forms in CRM 2013, please refer the following link

As you all know Quick Create Form is a nice a feature in CRM 2011. Lets learn the ropes of Quick Create Form in CRM 2013.

In order to get a better idea, lets consider a custom entity called Budget. 

So we aim to bring the quick create form for Budget in the Quick create Area as shown below. 




1. Firstly we need to do the following Setting on the entity (Budget in this context).

Settings --> Customizations --> Customize the System--> Default Solution ( OR your custom Solution in which Budget entity [ custom entity]  exists) -->Budget entity

Tick the check box Allow Quick Create. Please note that this property ( Allow Quick Create)  could be updated any time. As you know there are some attributes which can not be updated after the entity creation.


2.  Next step is to create a Quick Create Form. Lets navigate to Budget entity --> Forms

And select New Quick Create Form as shown below.


3. In simple words, we could place the most necessary fields of the entity on the Quick Create Form. In this case just name is alright. The next step is our usual CRM no-brainer , SAVE the form and Publish.


4. When we click on the Create we could see the option to create Budget Quick Create Form.




5. And it opens our sample Quick Create Form in CRM 2013.





Monday, 7 October 2013

Quick View Forms in CRM 2013 OR How to place Quick View Form in CRM 2013 OR Quick View Form Control in CRM 2013

Version used for this post: CRM 2013 online trial.

Its good to learn the ropes of the quick view forms available in CRM 2013. It is possible to add quick view forms for the custom entities as well.


Using Quick View Forms, we could see associated data. Quick view forms could be embedded in a Main form.

Our ball is ready. So lets get it rolling.

1. Lets consider our no-brainer, Account record. Please note the highlighted Primary contact section. Its possible to search contacts here.




2. So lets search a contact and it would bring the contact if it exists. Also note that its possible to create a new contact by clicking on the New button. Now lets select the contact.



3.  We could see a little form appeared. That's nothing but a contact quick view form.




4. Next step is to understand how the quick view form is configured in CRM 2013 and How could we place a quick view form in CRM 2013.

5. Lets navigate to Accounts form design. 

Settings --> Customizations --> Customize the System--> Default Solution ( OR your custom Solution in which Account entity exists) -->Account entity-->Forms 

Please note the following items on the form


  • Quick View Form Control button - When we need to place a quick view form on another form, we need to INSERT Quick View Form Control ( In simple words, A placeholder for Quick View Form)
  • Quick View Form control that's already on the Account form design. Lets double click on the existing Quick View Form control.





6. Here is our major component,  Quick view control.


  • The Quick View Form is based on a lookup field.
  • Related entity should be selected.
  • And then Quick View Form should be selected
  • Its also possible to edit the associated Quick View Form.




7. Lets click on the Edit button to see the selected Quick view form, account contact card. And here is the design of the Quick View Form - Account Contact Card. We could also find this Quick View form in Solution-->Contact entity-->Forms 




8. Please note that its possible to create multiple Quick View Forms for System entities as well as custom entities.









Sunday, 6 October 2013

How to Close a Form in CRM 2013 using javascript

With reference to CRM 2013 SDK, following is the code snippet to close the form.
Xrm.Page.ui.close();
Please note the following important points.
"The HTML Window.close method is suppressed. To close a form window you must use this method. If there are any unsaved changes in the form the user will be prompted whether they want to save their changes before the window closes." ( Ref: CRM 2013 SDK )

Whereas if we need to save the record using javascript, we could use the same methods whichwe were using in CRM 2011.
Xrm.Page.data.entity.save( null | "saveandclose" |"saveandnew" );
 
Arguments values:

save()
If no parameter is included the record will simply be saved. This is the equivalent of using the Save command.

save("saveandclose")
This is the equivalent of using the Save and Close command.

save("saveandnew")
This is the equivalent of the using the Save and New command.
( Ref: CRM 2013 SDK )

How to get the Base URL value in CRM 2013 using javascript OR How to get the Server URL in CRM 2013 using javascript

With reference to CRM 2013 SDK, please note that the js method context.getServerUrl() which was widely used in CRM 2011 is deprecated in CRM 2013.  So we need to use the following method instead to retrieve the base URL value. 

var baseURL = Xrm.Page.context.getClientUrl();

The values Returned:


Client
Value
Microsoft Dynamics CRM (on-premises)
http(s)://server/org
Microsoft Dynamics CRM Online
https://org.crm.dynamics.com
Microsoft Dynamics CRM for Outlook with Offline Access when offline
http://localhost:2525

Ref: ( CRM 2013 SDK )

Entity Image in CRM 2013 OR Image Attribute of Entities in CRM 2013 OR How to show Entity Image in CRM 2013

Version used for this post: CRM 2013 online trial

Entity Image is a good feature in CRM 2013. We could have an image on each record with this feature. 


For Instance, consider Account ( Customer ) entity. Its good to have the company logo with each Account ( Customer ) record.


Its possible to have image attribute for the custom entities as well. We will analyse it in the last part of this post.


With reference to CRM 2013 SDK,


"The following system entities have image attributes. Those marked with an asterisk are enabled by default to show them in the application."



Account *
KbArticle
Campaign
Incident
Competitor *
Connection
Contact *
Contract
TransactionCurrency
EmailServerProfile
Goal
Invoice
Lead *
Mailbox
OpportunityProduct
SalesOrder
Organization
Product *
Publisher *
Queue
Resource *
SalesLiterature
Territory
SystemUser *
(Ref: CRM 2013 SDK)

1. Firstly lets check Account entity record. When we click on the image icon on the left side of the header we get the option to choose an image ( Under 5 MB).


2. Lets have a look how could we enable the image attribute to show them in the application.
We need open the Account form and click on Form properties. This property enables the image on the form. We should remember this as it's useful when we create new entities.


3.  Another important points are the following

" For the initial release of Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online each entity can have only one image attribute and the logical name of that attribute is always entityimage. This property has been added to prepare for a future release in which entities may support multiple image attributes and there may be need to change which image is used as the primary image for the entity." ( Ref: CRM 2013 SDK)

4. Lets check it out by creating a new entity called Budget. Primary Image option set refers to the point that we just mentioned. Currently we could have only one image attribute per entity. So for now we can't choose anything from this option set. In future, if there are multiple image attributes provided in CRM then we could choose the primary image from this optionset.


5. Now lets create the image attribute for the Budget entity called Year Logo. Please note that the attribute name is 'enttityimage' and we can't change this. This also means that as of now this is the only image attribute we could have for this entity. As you all know we cant create multiple attributes with the same name.



6. Next step is to have this image on the form. Lets go to the Form design of Budget entity. Please note that the image entity is not available in the fields list.



7. As mentioned earlier, to enable the image on the form, we need to open the Form properties and tick the option Show image in the form. And say okay press okay. As per our usual practice we need to save the form and publish the form.



8.  Now lets check the budget entity record. We could select the Year logo image as shown below.