FAQ Database Discussion Community

CRM2011: create a role that is able to delete invoice products, but not able to delete the invoice

Is that possible to define a security role that is not able to delete any invoice but able to delete invoiceproduct of any invoice? The environment is not customized, and the definition( Tab:Mscrm.Form.invoicedetail.MainTab-->Group:Mscrm.Form.invoicedetail.MainTab.Groups-->Group:Mscrm.Form.invoicedetail.MainTab.Save-->Controls:Mscrm.Form.invoicedetail.MainTab.Save.Controls) for the ribbon button is <Button Id="Mscrm.Form.invoicedetail.Delete" ToolTipTitle="$Resources:Mscrm_Form_Other_MainTab_Management_Delete_ToolTipTitle"...

How to add columns to ListMember table in Microsoft CRM?

For the n:m list membership, Microsoft CRM uses an intersect table called ListMember. With a solution/plugin I need to attach new columns to this table. I know that I could create a new entity with this and keep it in sync with ListMember, i.e. creating one whenever a member is...

Crm2011: possible ways to hide delete ribbon button for [invoiceproduct] detail form

Just as the title, what are the possible ways to hide the delete ribbon button for [invoiceproduct] detail form. When I log in as admin, I can see the delete button on the [invoiceproduct] detail form. However, when I log in as a special user who does not have the...

Use web service As Datasource in CRM reporting

I working with Reporting Service (SSRS) on CRM 2011 then I want to use Web Service as DataSource. I make simple web service that query data from CRM Database (not Filtered) then I call it's from report preview on VS2012 It's work fine but When I deploy my Report in...

Does minifying your custom .js files have a benefit in CRM 2011

We are using microsoft CRM 2011. I have a developer who wants to minify our custom .js files (maybe 2 or 3 of them per form) because he believes it will improve performance. I agree that in a web site with thousands of hits, many of whom don't have your...

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

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");...

crm 2011: How provide a frendly response after discarding a request in a plugin

Just as the title, how to provide a friendly feedback after discarding a request in a plugin? Thanks in advance ...

How To Allow CRM Plugin To Handle Multiple Event Messages

I need to create a single plugin to fire on create, update, and delete events of opportunity entities. Can I do these in a single plugin? If so then how can I do them?...

CRM Javascript Automatically Populated a Look-up Value with a specific field

I'm trying to write a javascript on CRM Phone Call page. We have a custom look-up field called new_department, and we want to automatically populate the field with value "IT" (there should be one) when the form is opened. The thing is we have a separate Dev and Production CRM...

Crm2011:How to restrict deleting invoice-product

Any approaches to prevent invoiceproducts from being deleted? And pros and cons of these approaches. Plugin: capture deleting invoiceproducts request. UI script: Disable "Delete Invoice Product" button on the 'Invoice Products' button. Permissions: set up permissions for InvoiceProducts like other system entities. Thanks in advance...

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

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?

Get Users Appointment details using javascript onload in CRM 2015

Is there anyway to particular crm users appointment details using javascript ODATA or is there any other way. Thanks Vishnu...

Limit the result from FetchXML query in CRM online 2015

I am using a service that gets data from CRM ONLINE and transfers it to SQL database for reporting purposes. I am using the following Fetch XML query to query CRM string fetchXml = string.Format(@"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'> <entity name='new_studentinformation' enableprefiltering ='1' prefilterparametername='CRM_Filterednew_studentinformation'> <attribute name='new_studentid' /> <attribute name='new_primaryhomeroom' />...

CRM 2011 HTML web resource does not work in IE11

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...

MS CRM 2011 IFRAME “load” event not fired

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...

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

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...

Crm 2013 + To remove comma from Whole Number field

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...

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

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...

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

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...

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

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...

Crm 2011/2015 set select to null

I have on a page an option set that has been valorized with a value. I would like to update this value and set it to null. I am trying in this way Crm.Context.Account myAccount = new Crm.Context.Account(); myAccount.Id = "1af43..."; myAccount.Name = "bla bla bla"; myAccount.psw1_TipoSoc= null; OrganizationRequest request...

How to copy newly created CRM contact record to SQL table

I have written a plugin that fires off when new record is created (post). This plugin simple runs a SSIS package that moves newly created record details in to SQL table. I'm having to deploy this plugin as none isolation mode. What I want to know is that is there...

Open the lookup dialog of a field in CRM 2011 from javascript

How can I launch the lookup dialog of a lookup field, using javascript?

Dynamics CRM 2011 Plugin Deploy Error

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 ?...

crm2011 Upgrade a managed solution zip failed

When I upgrade an existing managed solution on crm 2011, The two options 'Maintain Customization' and 'Overwrite Customization' did not show up on the Deployment Wizard. the 'Next' button is disabled. See the following picture. Thanks in advance the following information are from the Import Log. I am confused whether...

Mapping Appointment Entity for Data Migration in Microsoft Dynamics CRM 2015

I need to migrate data from CRM 2011 to CRM 2015 for different entities. I am using scribe insight for this purpose. I am stuck with the the migration of different entities belonging to Activities like Appointment, Letter, Fax, etc. If its a normal lookup field i would have used...

CRM plugin execution of operations before Exception

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...

Restrictive Access with System Administrator security role in CRM2011

I am encountered with an insane problem when working in Dynamics CRM 2011 on-premises environment. Everything was working just fine 2 days back. There are two different CRM environment on my clients network (PreProd and Production). I have System Administrator role on PreProd. The problem is that somehow I have...

CRM 2011 synchronized records timestamp

Our CRM 2011 on-premise setup is such that users create records offline (using Outlook CRM client) and then synchronize them to the server once they are online. Is there column that timestamps when a particular record (e.g., a sales order) was synchronized to the server? I know I can look...

How to get CRM 2013 Online Database schema

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?

How to get sharepoint folder by name using CamlQuery

So I need to rename a sharepoint folder in a plugin from crm. The name of the folder is a fullname from a contact but in case of a typo in the name there needs to be a plugin to change the folder name in sharepoint aswell. I found a...

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

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? ...

how to increase speed report in ssrs

I work with Reporting Service in MS CRM I have a problem about Report speed. My report is slow when run on MS CRM For example in SSMS My Query run about 12 second but when I run on MS CRM it's run about 2 minutes and some report It's...

Error in QueryExpression with PartyList

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))...

Query to fetch emails tracked in CRM

Is there a way to query tracked emails in CRM 2011 or above using SQL(Filtered Views)? Please help.

How to restrict LINQ query to marketing lists of a given campaign?

I'm using LINQ to query the CRM, and below you can see what I already have. The goal is to restrict the query to marketing lists, that are attached to a given campaign. How can I do this in LINQ (with late binding)? List<Guid> GetLists(OrganizationServiceContext context, Guid campaign) { var...

In which table MS CRM system views are stored?

I am looking for the table that holds the criteria records for MS Dynamics CRM system views or saved Advanced Find views. Every saved view (system view or custom view) has some criteria that are used to filter the results. I would like to find the table in the database...

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

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 set fetchxml on subgrid control on Dashboard via ribbon button js

I am trying to pass custom fetchxml to a sub grid on a new dashboard I created. The problem is the dashboard does not use the name I specified in design mode to uniquely identify the grid. The code I have that works on sub grids on standard entity forms...

How to use predicates with LINQ to query CRM 2011

I am trying to use linqkit to Predicate. Getting following code when I am trying to compile. public void TestPredicate(Guid[] productIds) { var predicate = PredicateBuilder.False<Product>(); foreach (var productId in productIds) { var tempGuid = productId; predicate = predicate.Or(p => p.ProductId== tempGuid); } } var query = from p in...

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

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...

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

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...

Which filed is best Dynamic CRM or hardcore Dot Net Web developer [closed]

I am a dot web developer and recently I got an offer for CRM technical consultant from a company so I'm confused about that should I accept that offer or proceed with my recent field. so I need expert opinion from all you ? Which filed is best Dynamic CRM...

Microsoft dynamics crm learning using azure virtual machines

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...

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

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...

Metadata contains a reference that cannot be resolved. Error while trying to connect to CRM Online 2015

Background: I am using a Windows Service to connect to CRM Online 2015 to get specific data from there and move it to a local SQL database for reporting purposes. This is a well tested code that was running on the server of our client. Recently the service stopped and...

Linq predicate query results is not working for further Linq Join

I am using results from Predicate query to write join in Linq query. Bit it is throwing following error. However when I run similar query in SQL, it return expected results. var predicate = PredicateBuilder.False<Product>(); foreach (var productId in productIds) { var tempGuid = productId; predicate = predicate.Or(p => p.ProductId==...

Is It Beneficial To Call ExecuteMultipleRequest From Within A Plugin?

I know the ExecuteMultipleRequest is a huge performance booster when performing batch updates from outside of CRM. What I don't know is if it is beneficial to call it from within a CRM plugin. My current understanding is that the main performance gain from using the ExecuteMultipleRequest is in the...

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

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

Restrisct and read static files in crm 2011

We have xml files which are placed in custom folder "XMLFolder" inside Crmweb of MS CRM 2011.we are reading these xml files in java-script(using DOM). Now after IFD ,We are able to access these xml files directly through external url without authentication like "https://example.com/xmlfolder/xyz.xml Is there any way to restrict...