Posts

Showing posts from 2014

MSCRM 2015 Business Process stages and steps list using Javascript

We have a new feature in Microsoft Dynamics CRM 2015, to get all Stages along with Steps. Below is the code to get it. //Retrieve all Stages and Step Names against a Business process- works in 2015 function GetBusinessProcess() {     var message="";     var activePathCollection = Xrm.Page.data.process.getActivePath();     activePathCollection.forEach(function (stage, n) {         message += "Stage Index: " + n + "\n";         message += "Entity: " + stage.getEntityName() + "\n";         message += "StageId: " + stage.getId() + "\n";         message += "Status: " + stage.getStatus() + "\n";         var stageSteps = stage.getSteps();         stageSteps.forEach(function (step, i) {             message += "    Step Name: " + step.getName() + "\n";           ...

How to Enable Lync presence control in MSCRM

Image
Lync Presence control Enabling MSCRM There is an OOB (Out of the Box) functionality Lync presence control provided by Microsoft on IE Brower. How to enable: 1.       Click on IE Setting tab. 2.       Click on “Manage add-ons”. 3.       Enable “Lync Brower Helper” and “Lync Click to Call”. 4.       Click on IE Settings again. 5.       Click on “Internet options”. 6.       Select “Security Tab”. 7.       Select “Trusted sites”. 8.       Click on “Sites”. 9.       Click on “Add”. 10.    Click on “Close”. 11.    Now see in “My Active Contacts” view. Lync presence control will appear beside Full name.

Maximum number of processes, stages, and steps MSCRM 2015

Maximum number of processes, stages, and steps To ensure acceptable performance and the usability of the user interface, there are some limitations you need to be aware of when you plan to use business process flows: There can be no more than 10 activated business process flow processes per entity. Each process can contain no more than 30 stages. Multi-entity processes can contain no more than five entities.

getServerUrl is Deprecated

Xrm.Page.context.getServerUrl() is changed to Xrm.Page.context.getClientUrl() from MSCRM 2013 onwards

MSCRM Javascript confirm box - New feature in MSCRM 2015

Say good bye to normal java script confirm box. Microsoft Provided a new confirm box in new version 2015. Syntax:  Xrm.Utility.confirmDialog(message, yesCloseCallback, noCloseCallback) How to use it: 1. Call "GetCurrentStageName" function on Opportunity form load event. function GetCurrentStageName() {     var formType = Xrm.Page.ui.getFormType();     if (formType == 2 || formType == 3 || formType == 4) {         var activeStage = Xrm.Page.data.process.getActiveStage();         var stageName = activeStage.getName();         Xrm.Utility.alertDialog(stageName, onCloseCallback)     } } function onCloseCallback() {     var message = "This is javascript confirm box";     Xrm.Utility.confirmDialog(message, yesCloseCallback, noCloseCallback) } function yesCloseCallback() {     Xrm.Utility.alertDialog("you clicked on Yes"); } function noCloseCallb...

MS CRM Get Current stage name using javascript

we can get the Business process Stage name with out the stage field. here is the example: function GetCurrentStageName() {     var formType = Xrm.Page.ui.getFormType();     if (formType == 2 || formType == 3 || formType == 4) {         var activeStage = Xrm.Page.data.process.getActiveStage();         var stageName = activeStage.getName();         Xrm.Utility.alertDialog(stageName, onCloseCallback)     } } function onCloseCallback() {     //Write your callback functionality }

Disable navigation tour from MS CRM - New Feature in MSCRM 2015

Image
Say good bye to MSCRM navigation tour window in new version 2015. here are the settings 1. Go to System Settings 2. in General Tab go to the last option named,"Set Whether users see navigation tour"       Set this option to "No" 3. Now log out your CRM and log in again 4. You will not see the Navigation tour.

Value Rule using Ribbon work bench mscrm 2013

Image
Value Based Rule:                It will be applicable for option set value. Based on the option set values the button will be displayed. How to do it: 1.       Create a button and place it on the Form. 2.       Provide Name, Description, Alternate Text etc. to the button. 3.       Right click on “Display Rule” and Click on “Add New” option. 4.       Once the rule name is created (ex: Rule id: demo.lead.DisplayRule1.DisplayRule ), right click on it then select Add Rule option. 5.       Select “Value Rule” from the options provided by the pop up winnow. 6.       Right click on “ValueRule” provide Default: False, Field: your option set schema name (Ex: demo_status), Value: option set value (Ex: 737670000). When the option set value is “737670000” then ...

Form State Rule using Ribbon Work bench MSCRM 2013

Image
FormStateRule:         The button will be hide only when the form is in create mode. In all cases it will be displayed. How to do it: Step1: Create a button and place it on the Form as shown on the below figure:1. Step2: Provide Name, Description, Alternate Text etc. to the button. Step3: Right click on “Display Rule” and Click on “Add New” option. Step4: Once the rule name is created (ex: Rule id =>  demo.lead.DisplayRule0.DisplayRule ), right click on it then select Add Rule option. Step5: Select “Form State Rule” from the options provided by the pop up winnow. Step6: Right click on “FormStateRule” provide Default : False, InvertRule:True, State:Create. Step7: Go to command where you previously created and add this Display rule it as shown in the Figure: 2 Figure : 1                                               ...

Window.open with properties using javascript

It is used to open a URL in new window with properties. It is working on all browsers window.open('http://www.google.com', 'mywindow', 'menubar=1,resizable=1,width=350,height=250');

Useful tips in MSCRM javascripts

Microsoft Dynamics CRM 2011 - JavaScript Development There is a very handy JavaScript development cheat sheet available for Dynamics CRM 2011.  It is by Daniel Cai, a Microsoft Dynamics CRM MVP . I always refer to this cheat sheet's PDF whenever I need help in the new CRM 2011 JavaScript model.  Thanks to Daniel for a wonderful thought! You can download this PDF from his blog: http://danielcai.blogspot.com.au/2011/04/microsoft-dynamics-crm-2011-javascript.html I am just displaying all the methods, in my blog, so that they are easy to search from any search engine. Xrm.Page.context Methods ·                      getAuthenticationHeader:  Returns the encoded SOAP header for MSCRM 4.0 style Web service calls ·                      getCurrentTheme:  Returns th...