FAQ Database Discussion Community


CRM plugin execution of operations before Exception

dynamics-crm-2011,dynamics-crm,dynamics-crm-2013
I have a plugin that needs to create a bunch of entities, and does so using; service.Create(Entity); At the end of the plugin (pre-operation on Update, synchronous) I sometimes need to cancel the save operation. The only way I know how is to throw an exception, but if I do...

“An unexpected error ocurred” CRM2015 OnPremise Plugins

plugins,dynamics-crm,crm,dynamics-crm-2015
For 2 weeks we have been experiencing a small totally random issue with plugins in CRM 2015 OnPremise. When we make an upload, randomly and without much sense (at least according to analyze all code does not) plugins are throwing us the following exception: The Web Service plug-in failed in...

Workflow to send an email to the users within the record is shared

dynamics-crm,dynamics-crm-2015
I am using Microsoft Dynamics CRM 2015 on-premise version. I created a custom entity(News). The use of this entity: the system administrator can share records(News) with selected System users. My question: How to send Email Notification (to selected users) on Record Sharing?...

Is there a way of rollback the transaction inside Dynamics CRM plugin without throwing exception?

dynamics-crm-2011,dynamics-crm,dynamics-crm-2013
I need to cancel an operation of creating a new entity record from inside a CRM plugin without throwing an exception. Is there a way of rollback the transaction inside Dynamics CRM plugin without throwing exception? ...

Is there a NuGet package for Microsoft.Xrm.Client?

nuget,dynamics-crm,nuget-package,dynamics-crm-online
Is there a NuGet package for Microsoft.Xrm.Client for Dynamics 2013 and 2015?

If I deploy an update of a solution to CRM Online, can I just uninstall it to revert all changes?

dynamics-crm,dynamics-crm-online
If I deploy an update of a solution to CRM Online, can I just uninstall it to revert all changes? So I install version 1.0 with a custom entity, which has "First Name" and "Last Name" fields. Then I install version 1.1 with the addition of a "Department" field If...

WHat are “neglected cases” in a new organization?

dynamics-crm,dynamics-crm-2015
I've created a new organization on CRM 2015 and everything went dandy. Then, I attempted to create an additional one on the server and got the error listed below. What on Earth are "neglected cases" in a new organization? 16:10:44| Error| System.Exception: Publishing CRM reports failed. ---> Microsoft.Crm.CrmException: Could not...

Creating a Web Resource Web Page that Calls a Web Resource Javascript CRM 2015

javascript,sdk,dynamics-crm-2011,dynamics-crm,crm
I am using: /// <reference path="https://benelfakir.crm4.dynamics.com//WebResources/new_sdk_rest" /> But I get this message error <Message>ReferenceError: SDK is not defined</Message> that is my code /// <reference path="new_/Scripts/sdk_rest.js" /> function load() { var AccountId = Xrm.Page.data.entity.getId(); alert(AccountId); var account = {}; account.Description = "Updated Account Name odata"; SDK.REST.updateRecord(AccountId, account, "Account", "", errorHandler); alert("done");...

Microsoft dynamics crm learning using azure virtual machines

dynamics-crm-2011,dynamics-crm
I want to learn basics of dynamics crm 2011 and 2013. I have MS azure subscription where I do have access to Dynamics CRM virtual machines. These virtual machines have the following flavors for Dynamics CRM GP 2013 Developer GP 2013 R12 NAV 2015 GP 2015 Which one of the...

How to find “initial resolution time” for a case in Dynamics CRM

dynamics-crm
How can I create a workflow (or other method) to show me the initial resolution time for a case? Looking at the "Modified Time" isn't good enough as that will update if a case reopens and is re-resolved. I've created a field called "Initial Resolution" and then created a workflow...

Dynamics CRM 2011 Plugin Deploy Error

dynamics-crm-2011,dynamics-crm
I'm developing a custom plugin for CRM. When I deploy plugin to CRM on Virtual PC, I get the error below. Error registering plugins and/or workflows. Legacy plugin steps are only supported in Pre-validation and Post-operation stages How can I resolve this error ?...

Facebook Graph API(Version 2.3) publish event on a page from CRM plugin/wflow using C#/JS

facebook-graph-api,dynamics-crm,dynamics-crm-2015
In FB Graph API version 1 we had written a plugin and some js which used to push details of our campaign record in CRM to a predefined FB page as an event. Now in Version 2.3 the publishing endpoint is missing from the GRAPH api.(events) My questions are 1)...

Bulk Edit Products in CRM 2015

dynamics-crm
On Product entity views, I am not able to Edit multi-selected Products in CRM 2015 Online. Also tried by keeping the Products in Active as well as in Draft mode. Is is supposed to be like this? Kindly help. Thanks....

Do I need Windows Server 2012 and VS 2012 or 2013 to write plugins for MS CRM 2015?

visual-studio-2010,dynamics-crm,windows-server-2008-r2,dynamics-crm-2015
I've been asked to take a look at some of our current plugins and alter them for our upgrade to 2015. However, looking at the SDK it says the system requirements (see here) are Windows Server 2012 (and 8, but not relevant for me) and Visual Studio 2012 or 2013....

CRM 2011 HTML web resource does not work in IE11

dynamics-crm-2011,dynamics-crm
CRM 2011 html web resource is failing in IE11 with the error "Unable to get property 'CrmUrlEncode' of undefined or null reference". The same web resource works perfectly in IE 10 and less. The above error is triggering from the method context().getClientUrl() of XrmServiceToolkit (the codeplex library version 2.1). The...

Filtering instances not related to the current contact

dynamics-crm,dynamics-crm-2013,dynamics-crm-online,dynamics-crm-2015
I have a custom entity Stuff and it contains a lookup to Contact. I created a 1:N relation with the latter as primary and the former as related entity. On the Contact's form I added a subgrid and I only wish to list the instances of Stuff that have the...

In CRM 2011, best way to send information from javascript to plugins

dynamics-crm-2011,dynamics-crm,crm
I have an HTML web resource on a CRM 2011 form that users will be entering data into. This data will be required by CRM create/update plugins if the user chooses to save the main form, but there is no functional requirement that the data needs to be saved to...

Why is my Enitty.Contains(attributeField) returning false when I am able to set the value?

dynamics-crm,crm,dynamics-crm-2013
I have a block of code that is not working as I thought it would. I have set an Entity up as follows and have a previous guid. parentEnt = new Entity("vehicle_ent"); parentEnt.id = guid; Now when I do a check with a statement: if (parentEnt.Contains("attribute_field")) { parentEnt["attribute_field"] = "test";...

Error in QueryExpression with PartyList

c#,.net,dynamics-crm-2011,dynamics-crm,crm
I'm trying to retrieve appointments whose "requiredattendees" contains on one of entities from account list. requiredattendees have a type of PartyList. My query looks like: var query = new QueryExpression("appointment") { ColumnSet = columnSet, Criteria = new FilterExpression(LogicalOperator.Or) }; And adding conditions : GetAccounts() .Select(a => new ConditionExpression("requiredattendees", ConditionOperator.Contains, a.Id))...

CRM Advanced Find all the icons in wrong place

dynamics-crm,crm,dynamics-crm-2013
I've just loaded up the advanced find and I cant click on half the icons/drop downs as they are all in the wrong place. It works fine on other servers and other machines. It appears as if its a CSS problem. Any Ideas ...

What licence is required for a service to call MS CRM via the web services?

dynamics-crm,dynamics-crm-online
What licence is required for an external service to call MS CRM via the web services?

Use MetdataId to find the Attribute Name of a deleted attribute

metadata,dynamics-crm
When I query the metadata using RetrieveMetadataChangesRequest, the RetrieveMetadataChangesResponse returns EntityMetadata and DeletedMetadata. The DeletedMetadata only returns the MetadataId. Is there a way to get the metadata for the attribute without knowing the entity? Even just the attribute name would be fine. RetrieveAttributeRequest I think only works if the attribute...

How to get CRM 2013 Online Database schema

dynamics-crm-2011,dynamics-crm,crm,dynamics-crm-2013,microsoft-dynamics
How can i get database schema for my Dynamics CRM 2013 Online? Is it possible in CRM 2013 online? If it is possible to get database schema, can you tell me any procedure?

Dynamics CRM - Missing components while importing solution

dynamics-crm,dynamics-crm-2013
I have an issue with importing solution. First of all i will explain my method of importing. In our organisation we have all the solutions in source control (Extracted by solution packager as Both - Managed and Unmanaged). thanks to that we can build Managed or UnManaged Package from those...

In CRM 2011 how to create a record and associate it in the same ExecuteMultipleRequest

dynamics-crm-2011,dynamics-crm,crm
I'm struggling to find a way to use the ExecuteMultipleRequest to create a record and associate it to other records at the same time. So far I've only been successful in first creating the record, and then in another request set up my associations. With this code it throws an...

Combining query filters with CRM FilterExpression

c#,dynamics-crm
I am trying to write the following a (pseudo)query in C# for CRM 4: Status = active AND ( mail = somemail OR ( firstName like firstNameSearchTerm AND lastName like LastNameSearchTerm ) ) The problem is, that middle names might be part of firstName or LastName. I am having a...

Microsoft Dynamics CRM: Export solution from 2015 to 2013

dynamics-crm
Is it possible to export a solution from CRM 2015 (7.0) to CRM 2013 (6.1)? Instructions I've found online say there's a step to choose target version in the export wizard but it doesn't appear for me.

One workflow or multiple workflows?

dynamics-crm
I have an opportunity form and it has 4 statuses on it. For each of those statuses, I want to have a status date on it. When I'm making my workflow, I know that I can simply create four workflows to get the effect I'm looking for, but can it...

Modify a button label in dynamics crm

dynamics-crm,ribbon,dynamics-crm-2013
In my associated view pages of some entities, i want to modify some button labels. For masculine noun entities I want to have: Ajouter une nouveau "NameOfEntity" and for feminine noun entities I want to have: Ajouter une nouvelle "NameOfEntity" how can i change the button label, knowing it is...

Restart or no Restart after config file change

sql-server,reporting-services,dynamics-crm,crm
I have to make a small change to a SQL server config file (http://www.msbicoe.com/post/2013/05/06/SSRS-2012-Report-Server-cannot-load-the-TERADATASQLPDW-Extension-Error.aspx). Do I need to restart the server in order for the changes to be made or will it be fine without? Determines if I have to wait till an appropriate time to take the server down...

Using .NET string functions in where clause of LINQ

c#,linq,dynamics-crm,dynamics-crm-2013,dynamics-crm-2013-sdk
How can I use .NET frameworks string functions in LINQ query like this? var accounts = from a in orgContext.CreateQuery("account") where a["telephone1"].ToString().Replace("-","") == "1234567890" orderby a["name"] select new { id = a["accountid"], name = a["name"], telephone1 = a["telephone1"]}; This is ending up with error: Invalid 'where' condition. An entity member...

Microsoft Dynamics CRM and application authentication and authorization

authentication,authorization,dynamics-crm,dynamics-crm-online,dynamics-crm-2015
does Microsoft Dynamics CRM Online (2015) has some feature for authentication and authorization of external apps that needs to access CRM data records from all CRM entities? External apps are in my case 3rd party Windows Services etc. to perform some sync and automation tasks, and these apps does not...

Most efficient (& fastest) way to query a list

c#,performance,dynamics-crm
I'm trying to work out the most performant way to query a list. I know that there are a ton of examples out there and this has come up loads before, but I'm really new to this and I'm struggling with how to apply some of the concepts to my...

If I uninstall a managed CRM solution, what happens to the entity data?

dynamics-crm,dynamics-crm-online
If I uninstall a managed CRM solution, what happens to the entity data? ... assuming the solution has a custom entity in it? Similarly, if I install an updated managed solution, then revert by installing the original managed solution .. what happens to the actual data? If I deploy an...

'Unexpected error occurred Platform' - could this be due to incorrectly querying a picklist?

c#,dynamics-crm,dynamics-crm-4
I'm trying to return a list of 'team members' from a custom entity, where their role matches a list of specific values. The attribute I'm trying to match to is a picklist and I'm wondering if this is causing my error. Here's my code: public static BusinessEntityCollection GetTeamMembers(string BU, string[]...

How do I use the custom publisher prefix when creating a new entity field in CRM 2013?

dynamics-crm,crm,dynamics-crm-2013
I need to create a new field on a custom entity in a Microsoft Dynamics CRM 2013 solution. When I create the field the name is prefixed with an static "new_". I can see that there is a default publisher with this prefix and a custom one with another prefix....

Crm 2013 + To remove comma from Whole Number field

javascript,dynamics-crm-2011,dynamics-crm,dynamics-crm-2013
I have a field on my form of type "Whole Number". I want to remove comma from the field and display simple number. I know there exists a System Setting to remove comma however it will apply to all the fields i want to do it one only my current...

new to CRM, how to get CRM environment for learning and work around

dynamics-crm,microsoft-dynamics,dynamics-crm-online,dynamics-crm-2015
I m a .net developer and new to CRM. Unfortunately at my work we don't have CRM. I m intrested in learning CRM but not sure how I can get CRM environment for practice and learning. Please guide should I go for CRM 2015 ? Should it be installed on...

jQuery ajax data.d undefined

javascript,jquery,ajax,dynamics-crm
I am trying to get CRM data using the Ajax call. Data is being returned with 'd' and 'result' properties but I can't get it on client side. It says ajaxdata.d is undefined. A sample Ajax call: var context = Xrm.Page.context; var serverUrl = context.getClientUrl(); var ODATA_ENDPOINT = context.prependOrgName("/xRMServices/2011/OrganizationData.svc"); var...

How to Execute an Operation Outside of a Plugin Transaction in Dynamics CRM

c#,dynamics-crm,dynamics-crm-2013
I have a Trace entity in my CRM system, and I want to insert records for that entity regardless of whether or not a plugin or workflow activity fails. When real-time plugin/workflow fails, all the data operations that have happened are rolled back, so any inserted Trace records are also...

Why is Dynamics CRM 2015 SDK RetrieveEntityRequest is not returning IsLogical in AttributeMetadata?

c#,dynamics-crm,dynamics-crm-2013
Given the following simple CRM SDK code: using (var os = new OrganizationService(CrmConnection.Parse(".... some crm connection ..... ")) { var reReq = new RetrieveEntityRequest(); reReq.EntityFilters = EntityFilters.All; reReq.RetrieveAsIfPublished = true; reReq.LogicalName = "opportunity"; var reRes = os.Execute<RetrieveEntityResponse>(reReq); // null in my case? Console.WriteLine("AccountId: IsLogical = {0}", reRes.EntityMetadata.Attributes[0].IsLogical.Value) } Why does...

Dynamic CRM : Need to update Connection entities via API

dynamics-crm
I have created connection via API through below code(Dynamics Crm: creating Connection entities via API Entity connection = new Entity("connection"); connection["record1id"] = new EntityReference("contact", someContactId); connection["record1objecttypecode"] = new OptionSetValue(2); connection["record1roleid"] = new EntityReference("connectionrole", someConnectionRoleId); connection["record2id"] = new EntityReference("incident", someCaseId); connection["record2objecttypecode"] = new OptionSetValue(122); connection["record2roleid"] = new...

Deactivate Microsoft Dynamics 2013 Workflow from the javascript of a web resource

dynamics-crm-2011,dynamics-crm,dynamics-crm-2013,xrm,xrmservicetoolkit
I have a web resource in Microsoft Dynamics 2013 with an event in javascript where I would like to duplicate the same functionality of deactivating a workflow as the "Deactivate" button on the edit workflow page in CRM. I'm using the XrmServiceToolkit, and I was hoping that I would be...

Change “Opportunities” button name in navigation pane using Site Map

dynamics-crm,sitemap,dynamics-crm-2015
Is it possible that using the SiteMap to change the name of the Opportunity button that appears in the Sales navigation pane to any custom name instead of "Opportunities" ? Or this is a fixed name based on the name of the entity ? ...

Should I install UII for developing plugins from Package Manager Console or MS site?

plugins,visual-studio-2013,dynamics-crm,dynamics-crm-2015
I want to install the UII to connect to and develop plugins in my organization. However, I can't decide between installing it using the package manager console (as discussed in some nice blog) or using the download site from Microsoft. Both feel right......

SharePoint Online integrated with CRM Online says, “We're sorry, we can't sync because you've run out of space.”

dynamics-crm,sharepoint-online
I was trying to sync my document on SharePoint Online where I got an error saying, "we're sorry, we can't sync because you've run out of space." I believe this is independent of the CRM storage space we get (which is still under 8% filled for my CRM organization) How...

Microsoft Dynamics CRM performance issue on client side

dynamics-crm
I am new at the company and we have CRM2011 deployed on the sites and we have agents using our CRM system. On Weekly basis, end users complain that the CRM is running slow on the clients computers. I am beginning to learn about CRM and don't konw much about...

Show multiple relationship records in single view

dynamics-crm
I have an entity (asset) that has an N:1 relationship with Parent Account and Organisation (both the same Account entities) In the account entity, I can see either assets linked to it via parent account, or assets linked to it via organisation account, but not both (as far as I...

How to get daylight savings start and end for a time zone in Dynamics CRM?

javascript,datetime,dynamics-crm,dst,timezoneoffset
In CRM Online 2013, I need to determine the start and end dates of daylight savings time based on a specific time zone. I have code that needs to display times converted for different time zones, aside from the time zone in the current user's settings. For example, if the...

Cannot add ServiceActivity to CRM Dynamics solution

dynamics-crm,dynamics-crm-2013,crm-entity
I'm trying to customise the Service Activity entity which appears on the Service Calendar in Dynamics CRM 2013. When I open a Solution and click Add Existing, I can see the entity in the list, but when I click Ok I receive a generic error message "An error has occurred.."...

Email from Lower Hierarchy User to Upper Hierarchy User(Parent Business Unit) by workflow in MS CRM 2011?

dynamics-crm-2011,dynamics-crm,crm,dynamics-crm-2013,dynamics-crm-4
I want to create Workflow for Un-Attended Lead more than 24 hours then Email will shoot Automatically to User as {BM(BranchManager)} My Business Unit Hierarchy is : Main Organisation >> RBH Trading(Head) >> BM Trading(Branch Manager) >> RM Trading(Relational Manager) ![enter image description here][1] So, if any RM will not...

Linq query gives me ambigious invocation error on the select statement

c#,linq,dynamics-crm
building a query to return workflows that are in the waiting status and are related to a certain entity... When I try to write the select statement in my linq query, I get the error "Ambigious invocation" on the select statement. I'm not sure exactly what it means. Here is...

CRM 2015 and Silverlight

silverlight,dynamics-crm,dynamics-crm-2015
I've previously created a Silverlight application for CRM-2011 and there has been samples for Silverlight in the CRM-2011 SDK. However, I installed CRM 2015 SDK and I couldn't find any sample codes for Silverlight, does it no longer support silverlight ? If it still supports it, how can i create...

Pre Operation Concurrent Plugins Getting MAXIMUM Existing Field Value For An Entity Records

linq,linq-to-sql,dynamics-crm-2011,dynamics-crm,dynamics-crm-2013
I am trying to set a field (Record Number) on an entity in Pre-Operation plugin that triggers on create with an incremental number based on previous one. For example if the MAX Previous Record Number is 4 I will set the one being created to 5. I am using LINQ...

List Entity Relationships in Dynamics CRM 2013/2015

c#,powershell,dynamics-crm,crm,microsoft-dynamics
Is it possible to return a list of relationships on a particular type of entity (not an individual record) using the CRM/XRM SDK? For example, if I have an entity called "Case" and I need to see if it has a relationship with "MyCustomEntity" is it possible to query the...

Get Users Appointment details using javascript onload in CRM 2015

dynamics-crm-2011,dynamics-crm,crm,dynamics-crm-2013,dynamics-crm-2015
Is there anyway to particular crm users appointment details using javascript ODATA or is there any other way. Thanks Vishnu...

How do I read an attribute below in CRM 2011 using javascript?

javascript,dynamics-crm-2011,dynamics-crm,crm
I am looking for the most simplest way of writing javascript code to read an attribute(s) from the fetch xml given below. I have bumped into very complex ways of doing it. Can you suggest a quick and efficient way of doing it. <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"> <entity name="bch_delegate">...

MS CRM 2011 IFRAME “load” event not fired

jquery,iframe,dynamics-crm-2011,dynamics-crm,onload
I have MS CRM 2011 (5.0.9690.2243, on demand) HTML web resource which loads entity inside IFRAME: <HTML> <HEAD> <SCRIPT type=text/javascript src="http://code.jquery.com/jquery-latest.min.js"></SCRIPT> <SCRIPT> $(document).ready(function(){ if (window.console) console.log('doc ready'); var f=$("#m4_ifr_entity"); f.bind('load', function() { if (window.console) console.log('iframe loaded'); // do some stuff here }); }); </SCRIPT> <META charset=utf-8> </HEAD> <BODY contentEditable=true> <DIV...

What is the TECHNICAL Difference between Entity.Contains AND Entity.Attributes.Contains

dynamics-crm-2011,dynamics-crm,dynamics-crm-2013,microsoft-dynamics
What is the TECHNICAL Difference between Entity.Contains AND Entity.Attributes.Contains. I know both of them work, but looking for some technical details.

Display parentcontact tasks in alert box when form load

javascript,dynamics-crm
Pre requisite: --On account record set primary contact to any one contact of your choice --For the above contact create two test tasks. Actual task Retrieve those tasks using odata in account form save and iterate to show all name attributes in alert popup function dis() { var primarycontactid=Xrm.Page.data.entity.attributes.get("primarycontactid").getValue()[0].id; XrmServiceToolkit.Rest.RetrieveMultiple(...

Debugging a Dynamics CRM Plug-in

c#,plugins,dynamics-crm,dynamics-crm-online
I'm having trouble debugging a Dynamics CRM Online (2015) plug-in (C#). I'm following the instructions on this MSDN article to attach to a process. In the Attach To Process window, I select "Show processes from all users" and refresh. However, I don't see any of the four service processes listed...

Dynamics CRM 2011 shows unsaved data pop-up on close when no data has changed

dynamics-crm-2011,dynamics-crm,crm
On our Dynamics CRM 2001 website, I have a weird problem. When I open a record and then close it without modifying anything, I get the pop-up that says I have unsaved changes, even though nothing was changed. How can I fix this?

Test & Enable Mailbox in CRM 2013?

dynamics-crm,dynamics-crm-2013,dynamics-crm-email-router
In CRM 2013, is "Test & Enable Mailbox" in a Mailbox only for Server Side Sync? My Email Router setup works fine but when I run "Test & Enable Mailbox" I consistently get a Failure status, with the resulting alert stating the following: "The email message "Test Message" cannot be...

Dynamics CRM Report doesn't show data

sql-server,reporting-services,dynamics-crm,dynamics-crm-2013
I've run into a problem where when I upload my Custom Reports to Dynamics CRM it doesn't show any data in the reports. In my reports I used stored procedures which are stored in a separate database called "CustomReports". I've done a few tests to see if I could pinpoint...

How to Detect Duplicate record in CRM 2013 on Create (Pre-Validate ) Plugin

plugins,dynamics-crm-2011,dynamics-crm,crm,dynamics-crm-2013
I am writing a plugin which will detect duplicate ID on Create and will restrict the user to enter a new ID instead. NOTE : I CANT USE DEFAULT DUPLICATION METHODS PROVIDED BY MICROSOFT DYNAMICS 2013 or 2015. THIS IS A SPECIAL CASE. Following is the code of my plugin...

MS CRM 2011 - OnSave javascript - get entityId of related Entity

dynamics-crm-2011,dynamics-crm
In MS CRM 2011 (on premise), I have 2 related entities, let's say A and B (1:N). On a Form for A entity, I have associated view for entities B. Clicking on it will open a list of related entities B. Then I click "Add new B". When saving new...

Is it possible to add and configure Dynamics CRM workflows with Powershell

powershell,dynamics-crm,crm,microsoft-dynamics
Is it possible to deploy a managed solution to Microsoft Dyanamics CRM 2013/2015 with plugin assemblies via the UI, then use a PowerShell script to add workflows, and steps?