Posts

Showing posts with the label d365fo

Cool hack to transform data in Azure logic apps, using simple expressions (and no code)

Image
  Amigos, here goes a very cool hack to handle an incoming payload in your Azure Logic Apps, that can create any type of complex transformation, using just expression and variables -- nothing else.  I have covered how to transform using Data-mappers on another previous blog (https://community.dynamics.com/blogs/post/?postid=d7eda435-952b-ef11-840a-6045bddad7eb), but this one is even easier. Check it out: Background:    We have an incoming purchase order payload that cumbersomely looks like this: {   "OrderNum": "PO000111",   "VendorCode": "v0001",   "NoOfLines": 3,   "Currency": "euro",   "PaymentTerms": "14d",   "OrderStatus": "Received",   "Invoiced": "No",   "Lines" :   [     {       "ItemId": "I0001",       "Qty": 12,       "Price": 1000,       "LineNum": 1     },     {       "ItemId":...

XDS Policy of D365F&O: its hidden gems

Image
  Amigos, we all know the riches of XDS (eXtended Data Security) policies, and its vast shores of applicability. If you want to restirct data based on some preconditions, then, yes: XDS is the correct option for you. Suppose you have a requirement: you want to show the user-specific journal lines. I  have created Journal J1, J2, and J5, Tome has created J3, Harry has created J6. When I would logon, I should see only J1, J2 and J5. XDS could be a very solution for all such sitations. Generally these are the steps we follow for creating an XDS policy  a. Create a Query, start with a table for which you want to arrest the data, make it as a Constraint Table. b. Create an XDS policy, assign the created Query, to the policy XDS. Select the above primary table as the primary table for XDS. c. In the XDS policy, you can keep giving the tables' names which you want to arrest, one to the next. d. Select the ContextType as a 'RoleName', otherwise you can also select 'RoleProperty...

Step by step: walkthrough to manage custom work types for WHMS, X++

Image
  Whatsup guys?  This short write-up can help you to work with Custom-work types for WHMS module for mobile devises.  Let me expain the scenario first, and then the solution. We are in need of including a custom work type in our Advanced Warehouse Management mobile solutions, which should come as a part of any process (eg: prod pick-up or Prod Put-away or receive bulk orders, posting return order), and most importantly it needs to be prepopulated. When the step should come in your mobile, it must be prepopulated with some value (eg: customer name/ Lorry number/Challan number, etc.) -- which should be editable; user can edit it if he wishes.   And you need to execute a method to get it executed for this method: called UpdateCustomerName: Not sure where to start? This write up could help you. Step 1: Start with Creating a new class, which should extend WHSWorkCustomData : [ExtensionOf(classstr(WHSWorkCustomData))] internal final class DemoWHSWorkCustomData_Extensi...

Modifying a DMF data entity query dynamically, from another query, for filteration in D365FO

Image
  Problem statement  Have you ever came across a situation where you needed to run your data entity through a batch, and in your batch you have a very complex composite query (where the query ranges could be anything -- the user can keep adding new ranges to the query) and you need pass on the query range values to your data entity query. I bet you must have faced this: say, your data contract is having an AOT query called PurchContractQry where you have PurchTable, Purchline, InventDim, PurchParmLine and a litter of related tables. You have an entity that does have a different query (as you know Data entities store queries as packed data in DMFDefinitionGroupEntity )-- how could you possibly make the ranges flow to your Entity, then? The following blog explains the same. As an example: we have created a Data entity called D365DataEntityPurchExport , which exports records based on the ranges supplied in a query coming from a contract Class, called PurchContractQry. We need to ...

Make your menu items visible on main menu, conditionally,, using this cool feature of D365FO

Image
  Wassup guys? I am sure you must have encountered this situation where you needed to display your menuItems, on main menu, based on some condition, haven't you? This was only possible by using config keys and flights. Things get a bit tricky,  when suppose you have a requirement like this: you need to make it dynamic, by introducing a toggle switch on a field on a paremeter form.  Suppose on Accounts Receivables Parameters >> You have a field called ' Show US customer '. You have a requirement that says when you turn on this toggle, then only the menuItem ' Input SSN details ', under AR module. This is now highly acheivable by leveraging subscription to 'SysMenuNavigationObjectFactory' class, simply by saying a. Create a new class USMenuItemsVisibilityManager b. Copy the following method, with proper documentation (don't change signature/anything else) [SubscribesTo(classstr(SysMenuNavigationObjectFactory), staticdelegatestr(SysMenuNavigationObjec...