Trigger Power Automate on Condition
Introduction This blog explains how we can trigger Power Automate based on the required condition. Suppose you have a requirement where you want your flow should get trigger based on some condition then you can check condition on “Trigger” itself rather than adding a new action to check condition. Use Case: Trigger flow when Lead is created and Lead Source Type is “Trade Show” Trigger flow when Lead is created and Flag is “Yes”. Trigger Flow when Lead is created, Lead Source Type is “Trade Show” AND Flag is “Yes”. Trigger Flow when Lead is created, Lead Source Type is “Trade Show” OR Flag is “Yes”. Steps to be followed: Trigger flow when Lead is created and Lead Source Type is “Trade Show” Click on Ellipsis (…) –> Click on Settings Go to Trigger Conditions and Click on “+Add” Add condition. @equals(triggerBody()?[‘leadsourcecode’],7) NOTE: “Lead Source” is an option set field add value of that option to check. After adding condition click on Done. Test your flow. Trigger flow when Lead is created and Flag is “Yes”. Repeat step number 1 to 3. NOTE: Flag is the “Two Option” field for two option set fields use true or false in condition. @equals(triggerBody()?[‘cf_flag’],true) Trigger Flow when Lead is created, Lead Source Type is “Trade Show” AND Flag is “Yes”. Repeat step number 1 to 3. AND Condition @and(equals(triggerBody()?[‘cf_flag’],true), equals(triggerBody()?[‘leadsourcecode’],7)) Trigger Flow when Lead is created, Lead Source Type is “Trade Show” OR Flag is “Yes”. Repeat step number 1 to 3. OR Condition @or(equals(triggerBody()?[‘cf_flag’],true), equals(triggerBody()?[‘leadsourcecode’],7))
Share Story :
Multiple Ways to Share a Canvas App in PowerApps
Introduction :- This blog explains multiple options how to share a Canvas Apps in Power Apps. Steps :- Select App and click on Share option, below screenshot for reference Options of Sharing Published App :- 1. Specify each User by Name. Enter Username in sharing panel and click Share button App can be shared with other Users by checking the Checkbox for Co-owner. 2. Specify that your entire Organization. Type Everyone in the sharing panel and select the option of Everyone of your organization. 3. Specify a security group in Azure Active Directory. Select security group name in sharing panel Note :- You can’t share an app with a distribution group in your organization or with a group outside your organization. You can’t grant Co-owner permission to a security group if you created the app from within a solution. Tips :- Regardless of permissions, no two people can edit an app at the same time. If one person opens the app for editing, other people can run it but not edit it. Notify user for sharing app, select the Send an email invitation to new users check box. Conclusion :- Hope above Blog helps you sharing designed Canvas App in Power Apps with Users as per business requirement.
Share Story :
Mix and Match Discounts in Dynamics 365 Commerce (Retail)
In Dynamics 365 for Retail there are many types of discounts available which retailers can offer to customers. These discounts help the business increase the sales and also the customer base. One of the discounts is called Mix and Match Discount . A mix-and-match discount gives customers a discount when they purchase a specific combination of products. For example, a customer purchases two boxes of tea and receives 50 percent off the price of a tea cup. Products and variants can be included in mix-and-match discounts. Here is how you can configure Mix and Match discounts. In the above screen grabs you can see two types of mix and match discounts 1) Buy one product and get 50% off on the 2nd product 2) Buy one product and get another product free(100% off) You can add more products and use them in combination to offer discounts. After you have created discounts make sure to add your retail store to the price groups Hope this helps!
Share Story :
Threshold (amount-based) discount in Dynamics 365 for Retail(Commerce)
A threshold discount is a discount that is given to customers when the total for a transaction reaches one or more specified amounts. For example, you could create a discount that gives a 10 percent discount for purchases over 100.00 and a flat 25.00 discount for totals over 200.00. You can set it up from the following path Retail>Pricing and discounts Once you have configured the discount as per your requirement as shown here, do make sure you add a price group to it which has the the store mentioned where discount would be applied On POS whenever you sell an item from the Jewelry category and if the total bill is going over 1000$, customers will get 5% discount. Hope this helps!
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 :
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 :
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 :
Order fulfillment notifications in Dynamics 365 Retail (Commerce)
The order fulfillment operation in the point of sale provides a single work area in the point of sale that can be used to process orders. This includes everything from accepting the order, to marking it as shipped, or initiating store pickup. In my case we wanted a notification to appear on POS whenever a customer order is created. This is useful in a situation where the goods are stored in the store room and you want the store room person to be notified about a new order creation. This will enable him to start preparing the goods as soon as the order is created in POS. Which will be picked up by the customer later. For this to work, the front desk store worker and and the store room worker both need to have POS registers. The following setup needs to be done at HQ to enable this functionality Add order fulfillment button on POS, Enable live content on button Enable notifications for an operation Set up a notification interval Update the POS permission1. Add order fulfillment button on POS, Enable live content on button 2. Enable notifications for an operation Go to Retail > Channel setup > POS setup > POS > Operations. Search for the Order fulfillment operation, and select the Enable notifications 3. Set up a notification interval Go to Retail > Channel setup > POS setup > POS profiles > Functionality profiles. In the Notification interval field, specify how often notifications should be pulled. 4. Update the POS permission Go to Retail > Employees > Workers >, under Retail tab, open the POS permissions associated with the worker. Expand the Notifications FastTab, add the Order fulfillment operation, and set the Display order field to 1. After the setup please run staff and and channel configuration jobs and you are all set. Activate/relaunch the POS On POS create a customer order and select Pick up from store option. Once the order has been created, it would appear in the notification window depending on the refresh interval Now click on order fulfillment button, you will see all the orders. They would be in the accepted state by default. Now you can mark it as Pick, Pack to process the order. If the order needs to be shipped, you will have to click on Ship and then process it Hope this helps!
Share Story :
Suspend(Hold) and Recall a transaction in the POS in D365 Retail(Commerce)
Point of sale (POS) users can suspend in-progress transactions, and then resume them later or on a different register. Transactions are often suspended to quickly free up a register for a different task without losing any progress on the current transaction. For example, a store associate starts to process a customer’s transaction on a mobile device but must complete it on a register that has a cash drawer. In this case, the store associate can suspend the transaction on the mobile device, and then recall and resume it on a register. You can suspend a transaction by clicking on Suspend transaction button on POS and Recall it by using Recall transaction button You can void suspended transactions either by recalling the transaction and then performing the Void transaction operation, or by selecting the transaction in the Recall transaction list and selecting Void on the app bar. Alternatively, the store can be configured to prompt users to void suspended transactions when they close their shift. This can be configured from Functionality profile of the store. Hope this helps!
Share Story :
How to retrieve a Sub-string from a String
Problem Statement: We have a requirement where the client wants a part of String from Sales Order No. which is Code(Data type) and it is auto-generated from Number Series. The Sales Order No. value is “SO/123/789/456”. The required Sub-string was: 123<Space>789. Pre-requisites: VS Code AL Language Extension Microsoft Dynamics NAV / Business Central Solution: As per the requirement, we need to first retrieve Sub-strings “123” and “789” and this can be achieved using SELECTSTR( ) function. But SELECTSTR() only retrieves a Sub-string from a comma-separated String. And the Sales Order No. string is a slash-separated string. So firstly we need to convert this string to comma-separated string, which is achieved in the below-presented screen. CONVERTSTR(String, From Characters, To Characters) In the above Screen, “SalesOrder No.” is initialized in a text variable “SoNumber” and then is converted to a comma-separated string. The code is: CONVERTSTR( String: Text, FromCharacters: Text, ToCharacters: Text ) Now comes the part where we retrieve Substring from this converted String using SELECTSTR( ) function as the string is now converted into a comma-separated string, below screen shows how it is done. SELECTSTR(Number/Position, Comma-Separated String) As you can see in the above screen how SELECTSTR() function is used to retrieve substring on the 3rd and 4th position of the String and stored in text variables “No1” and “No2” respectively. And these variables are then initialized to another variable with space. The code is: SELECTSTR(Position, Commastring); In the above example the code is: SELECTSTR(3, Separatenumber); SELECTSTR(4, Separatenumber); Conclusion: We can retrieve a comma-separated string or any other character-separated string using CONVERTSTR() and SELECTSTR() functions. Hope this helps!
