How to: Create a Bot using Power Virtual Agents
Introduction : Power Virtual Agents help us build simple and easy bots which can be integrated with websites, Microsoft teams, etc. Here are the steps to create a bot using PVA. Login to your environment in https://powervirtualagents.microsoft.com/en-us/ The pop up for create new bot will be visible, name the bot and create. Go to Topics Follow the numbers sequence in the below screenshot for the steps. After you click go to Authoring canvas, you can add messages, actions or call flows. This is where you write the responses and actions of your BOT, Topic Checker displays errors if any. You can test the Bot by clicking on “Test Your bot”, left bottom of the browser.You can check the working and update the bot topic while testing by enabling the “Track between topics”. Conclusion: Publish the bot and click on demo website to the actual working of your Bot
Share Story :
Clear DateTime Field using MS Flows
Introduction: We had a requirement, where using MS flows, we had to set the field named Outreach which was a datetime field as blank. For a date time field,null expression cannot be directly set and so we could not clear the existing Date in this field When I tried to set null, it failed with an error “Minimum value for date can be 01/01/1753”. Solution: We used the below work around. Add a step Convert Time Zone, add base time as Null. Since we are not actually converting from any time zone, we can keep source and destination time zone as same. For the record on which we want to set date as null, configure run after as below. For the date, now set converted time instead of null Conclusion: The date will be cleared and set to blank.
Share Story :
Sort on Related Column in a View
Introduction: When we create a view, We can configure the sort but the sorting is available only for the columns which are a part of the entity on which the view is created. Eg: In the active accounts view, there is a column ” Email” which is a field from Contact Entity. If we see the columns available for sorting we cannot see Email. However, in case you want to sort on a column from the related entity we can do it using the view designer and Fetch Xml builder tools from the XRM Toolbox. Solution: On load of My active accounts, the default sort is on Account Name Open View Designer on XRM Toolbox Click on Edit Query to open Fetch XML Builder We can see the order attribute is on name Now, we can edit and add order attribute to emailaddress1 After you click on Return FetchXML, you will return back to view designer. Then click on edit XML and remove the disable sorting on the attribute. You can now save and Publish. Conclusion: The View My active accounts will be by default sorted by email address in ascending order.
Share Story :
Renaming SharePoint Folder using Microsoft Flows
Introduction: Using MS Flows, On any trigger, you can add the below action to rename the SharePoint folder. Steps: 1) In Actions, select “Send an HTTP request to SharePoint” 2) Enter the below details: Site Address: Select your site address from the list. Method: POST Uri:_api/web/GetFolderByServerRelativeUrl(‘LibraryTitle/CurrentFolderName’)//ListItemAllFields Headers: Accept application/json;odata=verbose X-HTTP-Method MERGE If-Match * Body: { Title :”New Name of Folder” FileLeafRef’:”New Name of Folder” } 3) The Folder Name in Uri and new folder names in body can be dynamic as per your requirement( Refer Screenshot below: the data here is taken directly from the trigger when file is created in SharePoint). Sample Output: Conclusion: Simple SharePoint Connector in MS Flows can help to rename a SharePoint Folder.
Share Story :
Post Entity and its Relationship with Lead Entity
Problem Statement: We have a recent requirement, where we had to make an SSRS report that will display the latest post against a Lead. Post as an Entity is not visible in customization, also in advance find of Lead, we do not have any related attributes from post. This makes it difficult to generate the query. Solution: When we check the relationship between lead and POST, we find the below The entity named Post regarding is not present in customization and neither is visible in Advanced Find. If we check the advanced find for posts, we will not find any field that is providing related details of lead. But if we go to edit columns and check the available columns, we will get a column named regarding. We can use the below XML Query to generate our SSRS Report. Conclusion: Some entities like POST,POST regarding and their attributes are hidden in CRM. Metadata Document Generator in XRM Toolbox can be used to view these hidden entities and fields. You can refer my blog Find hidden entities in CRM using metadata document generator from XRM Toolbox to know how to use Metadata Document Generator in XRM Toolbox.
Share Story :
Find hidden entities in CRM using Metadata Document generator from XRM ToolBox
Problem Statement: I had a requirement where I needed to check the fields on the Entity POST, however in CRM customization, I could not find the entity POST though it was visible in advanced Find. Solution: To view all the data related to any hidden field, you can use the Metadata Generator in XRM Toolbox Connect to your environment on XRM Toolbox. Search for Metadata Document Generator In Metadata Document Generator: Retrieve Entities and languages Select the entity you want to generate metadata for and enter the file path of the excel document where the data needs to be stored. Generate Document 4. Open the document, you will be able to see all the data related to the Entity. Conclusion: XRM Toolbox- Metadata Generator is helpful in case the entity cannot be viewed in CRM.
Share Story :
Entity Relationship Behavior in D365 CRM
Problem Statement: When a user changes the owner of Lead (either because the original owner has left the company or the lead is being assigned to a new salesperson), the system changes the owner on COMPLETED activities to the new owner of the record. This is a problem because it is important that we maintain the history as to who performed each task that happened in the past and by switching the owner for completed tasks this changes all historical reporting and records. Solution: This kind of situation can be easily handled by using the relationship behavior feature in D365 CRM. Create a new solution->> add the Activity Entity for which you need to make this change. (in below example I have added the Email entity). When you open the relationship, you will notice that the behavior is set to Parental. Parental Relationship: In this relationship all changes on parent record are reflected on child record. Change the type of Behavior to Configurable Cascading. This will enable the Assign\Share\Unshare\Reparent actions which were earlier set to Cascade All as the relationship was Parental. 4. For our problem Statement where we will be making changes to owner, we will be using changing the Assign Action. Below are scenarios handled by Assign Action in relationship feature (On Change of owner) Scenario 1:Cascade-None: No change will be done to existing Activities and Notes. No change on Child will be done if Change in Parent. Scenario 2:Cascade-Active: Only Open Activities will be updated to the new owner and date changed to date of change of owner. This option is not available for Notes, as notes are always active. Scenario 3:Cascade-All: Changes on the parent will be done on the Child. Scenario 4:Cascade-User-Owned: Changes on parent will be reflected on child records owned by the same user. As for our requirement, we will make it cascade active(Scenario 2) Below is an example for the same. a. Before Change of Owner, we can view the last updated Datetime of activity.b. After Change of Owner, we can view the last updated datetime of activity. As desired, The Date-time and owner is updated for open activity. (Since I have tried all the cascade options on the same Date, in my example you will be able to see change of time and not Date). Conclusion: By using the relationship behavior feature, we can maintain historical data even on changes done to parent record (change of Owner).