Posts

How to get Shared variable declared in PreValidate operation in D365 plug in

  Suppose when we declared a shared variable in PreValidate operation and we are trying to get it using Context.SharedVarible[“yourKey”] in PreOperation and PostOperation. It will give error as below.   The given key was not present on the dictionary.   We need to read it using below syntax in both preOperation & PostOperation   Var myVariable = context.ParentContext.SharedVariables["MyVariable"].ToString()

PreValidate plug in example

Image
PreValidation plug in example: One of the most common interview question that never forgotten by any one and of course in Realtime this will rarely used. When we want to get no of child records when we are deleting the main/parent record then we can use PreValidation stage to get the count.   As some one thinks at very first time, why can’t we get the count in PreOperation stage. Because this will be in the same execution and we will not get the record count and by the stage it reaches to 20(PreOperation) all the child records gets deleted as per the relationship behavior.   So we need to register our plug in in PreValidaton. Below is the sample example to get the count of child records when we register the plug in in Delete message.   if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is EntityReference)             {        ...

Disabling the Lookup View Picker in D365 UCI using Java Script

In previous version of CRM disableViewPciker=1 is working , now it is deprecated in UCI and will not work any more. Below is the syntax to achieve it. var lookupParameters = {};        var viewIdList = [ "View GUID 1" , " View GUID 2" , "View GUID 3" ] //Here you can give atleast one view ID        lookupParameters.disableMru = true ; //Disable Most Recent Items        lookupParameters.viewIds = viewIdList;               Xrm.Utility.lookupObjects(lookupParameters).then( function (selectedItems) {              //your logic        }, null ); Here in the above code, you still be able to see “Change View” button , but when you click on it it will display only views what we have added it that array.

'The remote server returned an error: (409) Conflict

When we are dealing with Azure Storage Table data insert, we may get this kind of error. This is due to when we are trying to insert a duplicate key inside a Azure Table Storage. duplicate key= PartitionKey+RowKey Ex: PartitionKey="1001"        RowKey="John" here once we insert the above data into Azure Table, and again if we are trying to insert same combination then we will get " The remote server returned an error: (409) Conflict " error. How to resolve it:     In this case we need to go with either of below methods as per your requirement. TableOperation.InsertOrReplace(tableObject) TableOperation.InsertOrMerge(tableObject)   

Get azure blob files inside Sub Directories

In Microsoft doc's we can find code to get blob files inside a container using c#. What if Container has some Sub Directories with blob data/files. How we can replicate the folder structure in our local machine.        There might a change Container contains empty folder or a file. Below code snippet will help to create the same Azure Container structure. here i have used ASPX pages as per my requirement. we can use other applications as well. To get Azure connection string use below URL:  https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string         public string storageAccountName = "azure storage account name";         public string accessKey = "your azure accesskey";         public string containerName = "myfirstblobcontainer";         public string connectiongString = "Azure connection string";         publ...

AI for Market Insights feature in Dynamics 365

Image
Now a days each IT Industry have been doing their job very much simpler by intruding automatic systems in it. Microsoft is the one who regularly introducing new changes to the existing technologies. Why Microsoft is intruding new feature in existing technologies frequently. Not at all good. Most of the people think like that only, because they need to learn it and implement as well. Don’t think like that. Every company is trying to get more and more clients by showing rich content or lot of features with in a small amount of time. So “AI for Market Insights” is an app introduced in Dynamics 365, which will helpful for marketing people to showcase a demo in an easy manner. It also shows do the sync between social media like Facebook, twitter, YouTube, Instagram. Here we will see a new feature “Market Insights” which is newly introduced in Dynamics 365. I think no need to give complete overview on how it works. You can ref...

How to integrate Finance and operations with Dynamics 365

Image
1.Go to https://dynamics.microsoft.com/en-us/get-started/?appname=finance 2.Click on Sign Up for free trail (you should login into Dynamics 365) 3.Select “Dynamics 365 For Finance and Operations”, provide work email address as your CRM user name and your phone number. Click on Get Started. 4.Once it creates it shows as below.