Skip to main content

Posts

Showing posts from 2020

How to Filter SubGrid Lookup view in Dynamics 365 CRM

How to Filter SubGrid Lookup view in Dynamics 365 CRM.  Please check the comments in the below code and do follow the steps accordingly and call the  filterSubGrid() funtion on onload. var LastQuery = ""; function filterSubGrid() { debugger; setSubgridLookupFiltering(); } function AddLookupFilter(entity_type, customFilter) { var subgridLookup = Xrm.Page.getControl("lookup_Contacts_Participants"); subgridLookup.addCustomFilter(customFilter, entity_type); } function setSubgridLookupFiltering() { var subgridAddButtonId = "Contacts_Participants_addImageButton"; //Try to get the element from both the current and the parent document. var subgridAddButton = document.getElementById(subgridAddButtonId) || window.parent.document.getElementById(subgridAddButtonId); //This script may run before the subgrid has been fully loaded on the form. If this is the case, //delay and retry until the subgrid has been loaded. if (subg...

How To Retrieve All Files from SharePoint Library Folder & Send an Email Attachment using Microsoft Flows

by   mydevexperience (abm)  In this blog I will explain how to retrieve all files from a specified SharePoint folder and send email as an attachment. Every flow needs a trigger to start with so here I am using a manual trigger. Next step I am using flow step SharePoint List Folder which returns files contained in a SharePoint folder. The return response is array of BlobMetadata which contains the below details. Name Path Type Description ItemId ItemId integer The value that can be used to Get or Update file properties in libraries. Id Id string The unique id of the file or folder. Name Name string The name of the file or folder. DisplayName DisplayName string The display name of the file or folder. Path Path string The path of the file or folder. LastModified LastModified date-time The date and time the file or folder was last modified. Size Size integer The size of the file or folder. MediaType MediaType string The media type of the file or folder. IsFolder IsFolder boolean A...

How to fix “Undeclared Property Error” when setting the Lookups with Dynamics 365 Web API

A very quick note to remind you about something really important when working with the Dynamics Web API, it is one of those things that you always forget to check until you spent 3 hours trying to figure out why it isn’t working. I was updating my code to create some related records after creating  a contact record and in one of the related entities I got this error: “An error occurred while validating input parameters: Microsoft.OData.ODataException: An undeclared property ‘YOUR FIELD’ which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values.” This is caused because in my request I had the wrong field name,  please remember always use the schema name for the lookups! It is quite common for different people to create the fields in an entity and as I am sure you know Dynamics 365 tends to keep th...

Plugin is not triggering while importing data in Dynamics 365 CRM

This problem is due to checking for depth in plugin, the async job that inserts imported data into CRM sets plugin depth to ‘2’, so the solution is to disable check for depth while data import.

What happens when a user is Assigned Multiple Security Roles in Microsoft Dynamics 365 CRM

What happens when a user is assigned multiple security roles in Microsoft Dynamics CRM? In smaller organizations, you may find situations when a Manager would like to have access to both a Sales Profile and a Service Profile in Microsoft Dynamics CRM. You may wonder what exactly happens when a user is assigned multiple security roles. Assume that a user is assigned the profiles shown below in the screenshot. You see that there are different access levels set for each profile.   You will that when the user gets assigned to both ‘Baseline for all users’ and ‘Sales Person’ profiles, the access levels get combined, and the user then has permissions as shown in the ‘Effective Permissions’ section. So you see that when a user is assigned multiple roles, the user gains the permissions associated with each role.

How to Filter Sub-Grid in Dynamics 365

In this example, I've added an "Accounts" sub-grid to my Account, configured to show "All Record Types" rather than "Only Related Records". The using this JavaScript we're filtering the sub-grid to display all the Accounts that the Primary Contact is a Primary Contact of (which will obviously include the current account). This function can be added to the form OnLoad and Primary Contact field OnChange to ensure the sub-grid is updated when the Primary Contact changes as well. NOTE: I've found it best to create a custom view to be used as the default sub-grid view, and to customize this view to display no results by default (using a filter such as: Name equals "X" and Name does not equal "X" – which will always return no results), this way you won't see incorrect data initially on load before the JavaScript kicks in. // Generic function to perform the filtering - this function shouldn't need to change function...