MS CRM 2015
Make sure to keep primary field in Lookup view – UCI
Category: "No Name" error in lookup,CRM Dvelopment Series,Dynamics 365,Lookup not sowing values,Lookup view,MS CRM 2015,Ms CRM 2016,MS CRM 4.0,No Name in lookup,UCI Author: HIMBAP Date: 2 months ago Comments: 0

Problem Recently faced one issue where lookup control was showing as “No Name”, so we are going to discuss steps to solved it. Solution When I saw this issue, first thing I checked primary field in the parent entity if it contains data or not, but it was not blank. Another strange thing I noticed, as soon as I saved… Read more »
Source: Mahendra Pal


Calling Entity bound Actions using Xrm.Web API with Entity Collection
Category: Calling action using javascript,Calling customer action using Xrm.WebApi,CRM Dvelopment Series,Dynamics 365,MS CRM 2013,MS CRM 2015,Passing entitycollection while calling actions,passing lookup under entitycollection while calling action Author: HIMBAP Date: 3 months ago Comments: 0

Requirement In this article we are going to discuss about calling entity bound action which have entity collection as parameter, we need to created this parameter from array list, while sending entity collection we need to send customer lookup as well, so let’s see how we can do that. Details Earlier, we discussed about calling out of the box actions… Read more »
Source: Mahendra Pal


Overriding out of box command button behavior – Step by Step UCI
Category: Apply custom logic to command buttons,Dynamics 365,Dynamics 365 CE Online,MS CRM 2015,Ms CRM 2016,Override UCI button behavior,Prompt user before saving entity record Author: HIMBAP Date: 3 months ago Comments: 0

Requirement: Sometime back we published a post for overriding out of the box command button behavior which works fine for the web client but one of our blog reader reported through twitter (Power of Social media ) that this customization is not working with UCI, so I thought of re-writing the same for the UCI. Details: Let’s see how we… Read more »
Source: Mahendra Pal


Downloading Notes Attachments using Paging
Category: CRM Dvelopment Series,Download files from Dynamics CRM using C#,Download Notes Attachments,Dynamics 365,Dynamics 365 CE Online,Dynamics 365 SDK,MS CRM 2011,MS CRM 2013,MS CRM 2015,Ms CRM 2016,Notes Attachments,PageInfo.PagingCookie Author: HIMBAP Date: 4 months ago Comments: 0

Introduction This article is about downloading Notes attachment from Dyanmics 365. If you have large number of records from where you want to download attachment, you can face different issues like timeout, slow downloading etc. Here I am going to provide sample code which you can use to download attachments from small set of data. Details To download attachment from… Read more »
Source: Mahendra Pal


Bulk Deletion Job Canceled Automatically – {Quick Tip}
Category: Bulk deletion cancelling automatically,Disable Admin mode Dynamics 365,Dynamics 365,MS CRM 2015 Author: HIMBAP Date: 5 months ago Comments: 0

Introduction Dynamics 365 allows us to delete our data in bulk. We can define query to select target data which we want to delete. We can also schedule if require and configure notification by providing email, which is used to send notification once bulk job is completed. If you are new to bulk deletion job then you can check this… Read more »
Source: Mahendra Pal


Updating associated Account on Opportunity Won
Category: Dynamics 365,MS CRM 2011,MS CRM 2013,MS CRM 2015,Ms CRM 2016,Update regarding account from Opportunity,Update regarding account on Opportunity Won Author: HIMBAP Date: 2 years ago Comments: 0

Introduction
Sometime we want to update the account associated to the opportunity, for example let’s say if opportunity status is changed to won, we want to update some of the attributes in the account record. This post is quick tip about doing these changes.

Requirement
Change Relationship type of the account to Customer when opportunity status changes to WON.

Solution
This can be done using different options but the easiest option is to use Workflow. We can use following steps to update account.
Let’s say we one following account and currently relationship type is set to prospect.
prospect1

And we have one opportunity for this account and now let’s create our workflow. Navigate to Settings->Processes->New and select details like following
prospect2
Now we want to run our workflow for everyone and on status changes only so configure scope and start when like following
prospect3
Next we want to check if status changed to Won only, because we only want to run our workflow for won opportunity. So click Add Step and add Check Condition, we need to configure it like following
prospect4
Now select the row under condition and click on Add Step again and add Update Record step. Next select Account under drop down and click on Set Properties button to update account field. We want to change Relationship Type so select relationship type and change it to Customer.
prospect5

Finally activate workflow, that’s all we need to do. Now when opportunity status will change to Won, regarding account will be updated to Customer.
prospect6
We can further put condition to check if relationship is different earlier and we want to make sure to only change if relationship type is set to specific.

Hope it will help someone !!

Source: Mahendra Pal


Get contact based on name and it’s BU- Sample Code
Category: Dynamics 365,Dynamics 365 CE Online,Get contact based on Business Unit name,Get contact business unit using query expression,MS CRM 2015,Ms CRM 2016,Query Expression,Using link entity with query expression Author: HIMBAP Date: 2 years ago Comments: 0

If you got requirement to get contact record based on it’s full name and it’s business unit name, this sample code will help you. Sharing following sample code to get contact using Query Expression.

public Entity GetContactByFullNameandBUName(string contact,string businessunit)
        {
            Entity contactEntity = null;

            // setup query expression to query contact for fullname and BU
            var query = new QueryExpression("contact");
            query.ColumnSet.AddColumns("fullname");
            query.Criteria.AddCondition("fullname", ConditionOperator.Equal, contact);
			
			//add link entity condition
            var linkEntity = query.AddLink("businessunit", "owningbusinessunit", "businessunitid");
            linkEntity.EntityAlias = "BU";
            linkEntity.Columns.AddColumns("businessunitid");
            linkEntity.LinkCriteria.AddCondition("name", ConditionOperator.Equal, businessunit);
			
			//execute query
            EntityCollection results = organizationService.RetrieveMultiple(query);

           if (results.Entities.Count>0)
            {
                contactEntity = results.Entities.FirstOrDefault();

            }
            return contactEntity;
        }

Hope it will help someone !!

Source: Mahendra Pal