Posted on November 23rd, 2015 by Ranjan Parhi
1.To send the message to the IFrame write following javascript code . Xrm.Page.ui.controls.get(‘IFrameName‘).getObject().contentWindow.postMessage(Value,”*”); 2.To receive the message on the IFrame write the message event inside the javascript on IFrame window.attachEvent(“onmessage”,functionname); 3.Define the function function functionname(Value) { var Name = Value.data; //Do any operation using Name }
Posted on November 23rd, 2015 by Pallavi Kar
We can use JScript to access Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online data from within the application. There are two web services available i.e Rest and Soap endpoints. Here we will have a look at the Rest endpoint service to retrieve some data. In our system we have two entities named “ServiceAppointment” […]
Posted on November 23rd, 2015 by Pallavi Kar
Lets walk through some lines to retrieve the attributes of a specified entity for MS CRM 2011. First of all lets have three properties declared in a class as below private OrganizationDetail CurrentOrganizationDetail { get; set; } private IDiscoveryService DiscoveryService { get; set; } private IOrganizationService OrgService { get; set; } Then in the second […]
Posted on November 23rd, 2015 by Monalisa Chakraborty
The following code demonstrates that list of account entity details in listbox. In WPF application within listbox store account entity name and accountid using IOrganizationService interface to connect with CRM 2011 server. public void populateList() { Uri myUri = new Uri(“http://localhost:5558/mfdev/XRMServices/2011/Discovery.svc”); IServiceConfiguration<IDiscoveryService> dinfo = ServiceConfigurationFactory.CreateConfiguration<IDiscoveryService>(myUri); var creds = new ClientCredentials(); DiscoveryServiceProxy dsp = new DiscoveryServiceProxy(dinfo, […]
Posted on November 23rd, 2015 by Monalisa Chakraborty
The following example demonstrates how to change entity display name and publish that entity. In this code defines retrieve attributes set of specific entity. Then change plural name and display name of that entity and publish it. For this operation here using IOrganizationService interface to connect with CRM 2011 server. public void ChangeEntityName() { Uri […]
Posted on November 23rd, 2015 by Monalisa Chakraborty
To achieve this functionality create an xml file that will hold the tooltip information. The following code illustrates it <tooltip> <entity name=”new_test”> <attribute name=”new_testField”> <shorttooltip>use for testing</shorttooltip> </attribute> </entity> </tooltip> Now use java script file to call above xml file for tool tips. The jquery library should include in that global java script file. the […]
Posted on November 23rd, 2015 by Monalisa Chakraborty
In CRM 2011 anyone can set back color of attribute field in form level using JavaScript. In entity form we can use entity attributes field. The following snippet illustrates this document.getElementById(fieldname).style.backgroundColor = “colorname”; // change back color of field to any color Use following snipet to color single option in option set using index number… […]
Posted on November 23rd, 2015 by Pallavi Kar
As Silverlight is not a integral part of CRM platform , its very cumbersome to keep track of error and debugging custom codes. So to debug a Silverlight application for CRM 2011 we need to follow certain steps as given below : 1.Build the silverlight application and set the breakpoint to the code where its […]
Posted on November 23rd, 2015 by Monalisa Chakraborty
The Xrm.Page Script Library Template is a Microsoft Visual Studio 2010 project that provides JScript IntelliSense and JScript libraries which uses Xrm.Page objects and methods.This template provides JScript IntelliSense completion and method documentation. The latest release of the Microsoft Dynamics SDK (Version 5.0.3) contains Microsoft Dynamics CRM Solution and Visual Studio extension that together will […]
Posted on November 23rd, 2015 by Pallavi Kar
To retrieve the values of a lookup field or any other field in a Silverlight page, we need to follow two steps i.e 1. Design the Silverlight application to retrieve the lookup field value. And create a web resource of type Silverlight and upload the .xap file. 2. Create a webresource in the form customization […]
Posted on November 23rd, 2015 by Ranjan Parhi
Step 1: Go to Setting>> Solutions. Create a new Solution. Step 2: Open the Solution. Click Add Existing>> Site Map . Step 3: Save and Publish the Solution. Export the Solution. Step 4: Unzip the Zip file. Step 5:Open the customizations.xml in Visual Studio/Notepad++. Step 6: Below the ResourCenter Area Write following codes . <Area […]
Posted on November 23rd, 2015 by A. Nibedita Dora
It’s often required to get the default tagprefix of an organization dynamicaly using REST endpoint. We can get the default tagprefix from Default Publisher.But to know which is Default Publisher we need to get the DefaultSolution. The following code snippet helps us to find the default tagprefix. //Get the default TagPrefix of the Organization var […]
Posted on November 23rd, 2015 by Pallavi Kar
In CRM we have a common requirement for plugins for setstate message ie when the status of a record changes (like activate/deactivated/state change of a record etc.) So, here we will look at some plugin codes which executes to update certain field when a record state changes ie activated/deactivated. using System; using System.Collections.Generic; using System.Linq; […]
Posted on November 23rd, 2015 by Abhisek Sriramka
The following code snipet illustrate this… protected override void Execute(CodeActivityContext executionContext) { // Get the context service. IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>(); IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>(); // Use the context service to create an instance of IOrganizationService. IOrganizationService _orgService = serviceFactory.CreateOrganizationService(context.InitiatingUserId); // Use _orgService to call methods. //Create a query expression specifying the Account entity and […]
Posted on November 23rd, 2015 by A. Nibedita Dora
Webresources associated to an Entity are stored inside “FormXml” of that entity as follows. <formLibraries> <Libraryname=”new_jquery.1.4.4.min”libraryUniqueId=”{405ae6dd-4825-97e3-7de4-8653dde56587}” /> <Libraryname=”new_SDK.Metadata”libraryUniqueId=”{10073a56-0333-96c7-405d-593a6cece89a}” /> <Libraryname=”new_toolTipsJS”libraryUniqueId=”{b289a047-30e1-d90d-317b-0bbce7e486b8}” /> <Libraryname=”new_json2″libraryUniqueId=”{442753de-bb92-aad2-8505-a6ae9b0c1ab6}” /> </formLibraries> To get the FormXml of an entity we need to query “SystemForm” with some filter condiion . The following code snippet helps us to find WebResources associated to an Entity. […]
Posted on November 23rd, 2015 by Pallavi Kar
PartyList : This is a data type available in MS crm. It is almost a lookup that can have references to more than one records of an entity for a single field. A partylist has certain attributes like name, id, type,typename etc. So the basic operation for such a field will be to retrieve or […]
Posted on November 23rd, 2015 by Pradip Sukla
IOrganizationService is the primary webservice for accessing the data and metadata for the organization on MS Dynamics CRM 2011. Here is the code snippet for accessing it on a On-Premise, IFD and Online Server. On-Premise: OrgService = Uri orgServiceUri = new Uri(“Org Service URL”);IServiceConfiguration<IOrganizationService> orgConfigInfo = ServiceConfigurationFactory.CreateConfiguration<IOrganizationService>(orgServiceUri);var creds1 = new ClientCredentials();new OrganizationServiceProxy(orgConfigInfo, creds1); IFD: creds.UserName.UserName […]