Latest Microsoft Dynamics 365 Blogs | CloudFronts - Page 75

Add lookup fields in an editable grid using PowerApps

Introduction: We had a requirement where we wanted to show the editable grid in power apps. The fields which are suppose to show are of string, decimal and lookup. Other data type was easy to display but we find difficulties in showing the lookup value.   In this blog, we will learn how to add lookup fields(combo box) into the editable grid and also save it in Dynamics 365 CRM.   Steps: 1. Insert Gallery :  Insert a new gallery – Insert > Gallery > Blank Vertical Add Data Source to the Gallery Go to Properties > Click Data Source you want. 2. Add Combo Box input control in the PowerApps Grid.     I have added 3 Combo Box input control inside the Grid, 2 text box, 1 is currency field in the data source and a Save icon. 3. For each Combo Box input box: Item Property: Set ComboBox.Item = Choices([@’Data Source’].<Field Name>) For eg: RoleComboBoxRP_1.Item = Choices([@’Role Prices’].Role) DefaultSelectedItems property: Set ComboBox.DefaultSelectedItems = ThisItem.<Field Name> For eg: RoleComboBoxRP_1.DefaultSelectedItems = ThisItem.Role 4. For each text input box: Default property: Set TextInput.Default = ThisItem.<Field Name> For eg: DescriptionRP_1.Default = ThisItem.Description Note: Do not forget to set the <DefaultSelectedItems> properties or else the value wont be visible in the grid. 5. To Save the changed value into the Data source, set the Save Icon to the following: OnChange property: Set SaveIcon.OnChange = Patch(DataSource, ThisItem, { <fieldName>: TextInput.Text, <fieldName>:ComboBoxName.Selected, <fieldName>:Value(CurrencyTextInput.Text) }) For eg: SaveRP_1.OnChange = Patch([@’Role Prices’], ThisItem, { Role : RoleComboBoxRP_1.Selected, ‘Resourcing Unit’:ResourcingUnitComboBoxRP_1.Selected, Unit:UnitComboBoxRP_1.Selected, Description:DescriptionRP_1.Text, Price:Value(PriceRP_1.Text) }) 6. The Output Screen. 7. The changed Lookup value. If you click the Save Icon the changed values will be saved. In this way we can change the Lookup values and also Save the changed value in the Dynamics 365 CRM.

Share Story :

Overview of Modern POS with Retail Store Scale Unit (RSSU)

Retail Store Scale Unit allows retailers to sell products within store locations that have internet connectivity issues, where it fails to connect with headquarters (HQ). Retail Store Scale Unit support both Modern POS and Cloud POS within the store. MPOS with Retail Store Scale Unit allows users to perform cross-terminal scenarios across multiple POS devices, like Suspend Shift Close Shift Blind Close Shift Manage Shift Inventory Lookup Stock Count Print X-Report Print Z-Report whereas Cloud-based MPOS offline fails to perform these operations. MPOS with Retail Store Scale Unit fails to perform real-time operations such as Issue/pay Gift Cards Issue Loyalty Card Picking and Receiving Pay by Customer Account Credit Card transactions Order Fulfillment View/Create Time clock entries unless there is internet connectivity to HQ or a payment provider. If most of your transactions involve real-time transactions, then your Store Scale Unit will always need internet connectivity to enable the connection to HQ or payment provider.

Share Story :

How to use a Custom URL for your text column in Power BI

In this blog I am going to explain you how to create a custom URL for your text column in Power BI desktop. You can create hyperlinks in tables and matrix in Power BI desktop. Before jumping to use a new feature in Power BI desktop, I am showing you how we had done previously. Step 1: Import sample data in Power BI desktop. Step 2: If the hyperlink doesn’t already exist as a field in your dataset, use Power BI Desktop to add it as custom column like “WebURL”. Step 3: In Data view, select the column and in the Modeling tab choose the dropdown for Data Category. Step 4: Select Web URL. Step 5: Switch to Report view and create a table or matrix using the field categorized as a Web URL. The hyperlinks will be blue and underlined. Step 5: If you don’t want to display a long URL in a table, you can display a hyperlink icon instead. Note that you can’t display icon in matrix. Select the table to make it active. Select the Format icon to open the Formatting tab. Expand Values, Iocate URL icon, and turn it on. Step 6: Now we want a web link on custom column, so first we uncategorized the WebURL column. In Data view, select the column and in the Modeling tab choose the dropdown for Data Category. Step 7: Switch to Report view and remove the WebURL column from the table. Select the table to make it active. Select the Format icon to open the Formatting tab. Expand Conditional formatting, select filed that you want to active hyperlink and locate Web URL, and turn it on. Step 8: Turn Web URL on, one popup will be appeared in this you have to select WebURL field and click on OK button. Step 9: Result look like below screenshot, now you hover on column field you can clearly see the hyperlink. I hope this will help you.  

Share Story :

Fixed Asset Management In Business Central

Introduction: In this series of Fixed Assets aka FA, I will be teaching you through a life cycle of the Fixed Assets. How to create and acquire these fixed assets, how to depreciate the FA, and how to post transactions on Fixed Assets in Microsoft Dynamics Business Central.   Pre-requisites: Microsoft Dynamics Business Central (ERP) Basic understanding of Fixed Assets Demonstration: 1. Creation of Fixed Assets: To create Fixed Assets search Fixed Assets and open the Fixed Asset List. Click on New (+), automatically FA No. is set up from No Series. Enter the FA Name, FA Class Type, FA Subclass Type, FA Location if you have multiple FA Locations. Creation of Fixed Asset Setup the FA Depreciation Book, by default we have COMPANY. Also set up the Depreciation Start Date and End Date or Start Date and No. of Years. Book value is the current value of the Fixed Assets. This value increases or decreases depending on your Appreciation or Depreciation of FA. 2. Acquire Fixed Assets: There are two ways you can acquire Fixed Assets i. Using Acquire Button on the Fixed Asset Card In Order to acquire the fixed asset, click on the ‘Acquire’ action on the Fixed Asset Acquire Action This will open a Wizard to get the Data from the User and convert into Fixed Asset G/L Journal Acquisition Entry Wizard to take the Data from the User.   Entering the Acquisition Cost and Posting Date   Entering the Balancing Account for Acquisition Amount   Finish the wizard.   Acquisition Entries in FA Ledger Entries ii. Posting a Purchase Order for Fixed Asset: To acquire FA using Purchase Order, insert the FA Purchase Lines. Once you post the Purchase Order, an acquisition entry will be created in FA Ledger Entries. Fixed Asset Acquisition through Purchase Order   Fixed Asset Acquired through Purchase Order 3. Post Salvage Value: To post a Salvage Value, goto Fixed Asset Journal. Insert the Entry to based on the FA No., FA posting type as Salvage Value and Amount that will be received back when Fixed Asset is disposed off. Post Salvage Value – Fixed Asset Journal You will find the Salvage Value in Statistics. According to rule Depreciable Basis  = Acquisition Value –  Salvage Value FA Statistics after Salvage Value is posted 4. Setup Depreciation:  To setup depreciation, you will need to insert the Depreciation Method, Depreciation Start Date, Depreciation End Date and No. of years. Setting up Depreciation 5. Calculate Depreciation: To create a depreciation, make use of Calculate Depreciation Report where you can set the Document No., Posting Date, you can even put the No. of depreciation days etc. Calculate Depreciation This report will create depreciation entries in FA G/L Journal. Calculate Depreciation – FA G/L Journal   Depreciation Entry 6. Disposing of a Fixed Asset: To dispose of a Fixed Asset, you need to create a Disposal Entry in FA G/L Journal FA G/L Journal Disposal   After Disposing the Fixed Asset Disposal should be done on the end date of Depreciation. After Disposing the Salvage Value is posted to Sales Account andFA Book Value becomes 0. Conclusion: In this way, I have shown you the Life cycle of a Fixed Asset. It is relatively easier to deal with Fixed Asset as it doesn’t contains any inventory and accounting is much more simpler. In my next blog I will be inclining towards advance version of Fixed Asset Understanding  

Share Story :

What is “Does not support untyped value in non-open type” ODataException in creating records in D365 CE?

One of the most common errors we come across while calling API to create records in Dynamics but isn’t clear what it means? One such issue is – “An error occurred while validating input parameters: Microsoft.OData.ODataException: Does not support untyped value in non-open type.” On the console of the browser, you’ll see this – But, if you open the <objectName>.responseText of the Failure message of the call, you’ll see the below – A more zoomed view of the error would be below – This is because of my typo in the code [Which is the case for most scenarios] where you mistype a name of the field and neither does the error itself doesn’t specify which field you’re missing out on nor what it means! Reason This is because of a simple typo  in one of the fields in the object I was creating using AJAX In my case, this should have been “entity.duration” and not “entity.durationn“. It was a simple issue which led me wander troubleshooting in areas which I shouldn’t look into. Hope this saves you some valuable time! Happy 365ing!

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 :

How to use Expand Query in MS Flows

Introduction This blog explains how to use Expand Query (N:1 Relationship) in the Common Data Service List Records Connector. Steps to be followed: Initialize Variable of type string. Using Expand in list RecordsExpand Query: cf_Project($select=cf_projectname,cf_projectabbreviation) Here cf_Project is the Schema Name of Project Lookup field on location entity. Pass the field names of the project entity that  you want. Here I have passed cf_projectname and cf_projectabbreviation. Result of list record: You can see we get Project value in the below format to use this we have to parse the JSON. “cf_Project”: “{\r\n \”cf_projectname\”: \”Client Commercial\”,\r\n \”cf_projectabbreviation\”: \”CC\”,\r\n \”cf_pmtrackerid\”: \”3b576605-9c82-e911-a839-000d3a07f695\”\r\n}” Retrieving Project Values. Use “Apply to each” to get the value of the Project. Pass “Value” of “List Records” from Dynamic Content in “Select an output from previous steps” Now Set the Value in the “Project” variable which we had initialized earlier. Go To Expression and type: items(‘Apply_to_each’)[‘cf_Project’] Note: Here “cf_Project” is what we had retrieved in the output of ‘list records’. Make sure you pass this value correctly. “cf_Project“: “{\r\n \”cf_projectname\”: \”Client Commercial\”,\r\n \”cf_projectabbreviation\”: \”CC\”,\r\n \”cf_pmtrackerid\”: \”3b576605-9c82-e911-a839-000d3a07f695\”\r\n}” Result of Project Variable: Parsing JSON. Use “Parse JSON” action Add “Project Variable” in Content from “Dynamic Content” Click on “Generate from sample” to generate JSON Schema Enter sample JSON payload and click on done. { “cf_projectname”: “Test Project”, “cf_projectabbreviation”: “TR”, “cf_pmtrackerid”: “3b576605-9c82-e911-a839-000d3a07f695” } It will generate a JSON Schema automatically. Using Project Values. After parsing Json successfully you can use the values of the project entity field. You can use “Compose” to get and check the value. Enter “cf_projectname” in “Compose” inputs. OutputEntire FLOW: NOTE:  You can add multiple expand queries in List Record:Query: cf_Project($select=cf_projectname,cf_projectabbreviation),cf_ParentLocationId($select=cf_name)

Share Story :

Send an e-mail to any audience when Power BI data alert is triggered

Posted On January 7, 2020 by Sandip Patel Posted in

In this blog I am going to explain you how to send an e-mail to any audience when a Power BI data alert is triggered. Step 1: Create a sample of Power BI report using visuals like gauge, KPI or card title. Step 2: Publish your Power BI report on app.powerbi.com site. Step 3: Pin individual visuals like gauge, KPI or card title. Step 4: Go to dashboard page, select chart and click on ellipsis Step 5: Click on Manage alerts, click on Add alert rule Here you can set the threshold condition and based on above and below amount. Also set maximum notification frequency either at most every 24 hours or at most once an hour. Step 5: Login to https://flow.microsoft.com/ Step 6: Create a Templates “Send an e-mail to any audience when a power BI data alert Is triggered” After clicking on continue button Set Alert Id that have been created on manage alert in Power BI. Click on Save button. Step 7: Whenever data changes on Power BI dataset and alert rule condition satisfied this Power Automate flow is triggered and send mail to target audiences. I hope this will help you.

Share Story :

Conversion of Time and Date in MS flow

Introduction We had a requirement where we wanted to create a price list with current date time with respect to current country. In this blog we will use the OOB date conversion functionality. Use Case : (UTC with ) We created a flow where we had used UTC now functionality but this was returning the value time value with -5.30 hours. After doing RND I come to know that it automatically adjust the time using our time zone. As you can see in the below screen shot.   Solution: To over come with this issue we need to use the inbuilt functionality convertTimeZone. It takes below parameter Sr No Parameters Example Explanation 1. <timestamp>     Utcnow() It is a string or function which contains the timestamp 2. <sourceTimeZone>       UTC The name for source time zone . We can write source time zone which we want to convert into 3. <destinationTimeZone>       India Standard Time The name for the target/destination time zone. In this case we want to convert UTC into India Standard Time. So the India Standard Time is a destination TimeZone   4. <format>     dd/MM/yyyy HH:mm   Its a format  in this case we wanted to convert into date and time dd/MM/yyyy HH:mm As you can see in the below screen i have converted UTC to India time zone. convertTimeZone(utcnow(),’UTC’,’India Standard Time’,’dd/MM/yyyy HH:mm’) Result: As you can see in the below screen shot it shows the date time in the mentioned format or you can say indian format. Conclusion: Hope this will help you to over come the time zone issue while working with different country time.   For more Time Zone conversion refer : https://docs.microsoft.com/en-us/previous-versions/windows/embedded/gg154758(v=winembedded.80)?redirectedfrom=MSDN

Share Story :

Share Records in D365 CRM by Code

Introduction: This blog details steps how to share entity record in D365 CRM by Code. Scenario:  We have client requirement to share record with multiple set of Users in D365 CRM based on criteria selected by User on Form and needed to be automated. Implementation Step: Below code to be developed for OnCreate of record. Create new method ShareRecords private static void ShareRecords(IOrganizationService service, Entity entity, Entity segmentUser) { var CreatedReference = new EntityReference(“systemuser”, segmentUser.Id); var grantAccessRequest = new GrantAccessRequest { PrincipalAccess = new PrincipalAccess { AccessMask = AccessRights.ReadAccess | AccessRights.WriteAccess | AccessRights.AppendToAccess, Principal = CreatedReference }, Target = new EntityReference(entity.LogicalName, entity.Id) }; service.Execute(grantAccessRequest); }   Retrieve User List of Users and execute ShareRecords method EntityCollection segmentUsers = service.RetrieveMultiple(new FetchExpression(fetchXMLUsers)); foreach(Entity segmentUser in segmentUsers.Entities) { ShareRecords(service, entity, segmentUser); } Below code to be developed for OnUpdate of record. Create new method UnShareRecords private static void UnShareRecords(IOrganizationService service, Entity entity, Entity segmentUser) { var CreatedReference = new EntityReference(“systemuser”, segmentUser.Id); var revokeUserAccessReq = new RevokeAccessRequest { Revokee = CreatedReference, Target = entity.ToEntityReference() }; service.Execute(revokeUserAccessReq); }   Retrieve existing shared Users and remove there Access private static void RetrieveSharedUsers(IOrganizationService service, EntityReference entityRef) { var accessRequest = new RetrieveSharedPrincipalsAndAccessRequest { Target = entityRef }; var accessResponse = (RetrieveSharedPrincipalsAndAccessResponse) service.Execute(accessRequest); foreach(PrincipalAccess principalAccess in accessResponse.PrincipalAccesses) { EntityReference prAcc = principalAccess.Principal; Entity entity = new Entity(entityRef.LogicalName, entityRef.Id); Entity segmentUser = new Entity(prAcc.LogicalName, prAcc.Id); UnShareRecords(service, entity, segmentUser); } } Implement code for ShareRecords explained in step 1 & step 2.   Conclusion: Hope this blog helps you to to share and unshare records by code in D365 CRM based on custom criteria data on record dynamically.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange