Tag Archives: Extension
Factbox of workflow history on purchase order in D365FO
Introduction: In this blog, we will see how to create factbox of workflow history of purchase order in Microsoft Dynamics 365 Finance and Operations Details: Well, Factbox is a very pretty cool feature available from the earlier version AX 2012. It is very easy to achieve in Dynamics 365 as well. Here we will see how easy it is and steps for that. As shown in the above image, we will be going to create factbox for the “Tracking details list” Steps: Create the solution in Visual Studio and project for that. We’ll be required four objects mainly that is one display MenuItem, Table, Form (on which to display factbox), another Form (factbox). Reference attached below: 1. Table For displaying workflow history, we need to create the extension of table WorkflowTrackingStatusTable and create the normal relation and its relevant properties as 2. Factbox Now we are required to create the factbox of workflow history. For that we will use the effortless technique, where we will duplicate the standard form “WorkflowStatus” and will name as CFSPurchTableWorkflowHistoryFactBox (give name as per your naming convention standards) After duplicating and renaming the form, we need to change the pattern as “custom” After applying the custom pattern, delete the NavigationList which is not required in factbox, and do visible false ActionPane and PanelTab After that create the new Grid and assign the data source to it in the property and put all the required fields to show in factbox 3. Display MenuItem We will attach the created factbox form to the display menu item and relevant label “Workflow history” 4. Base form Base form we call it as where we will attach the factbox. Here it is purchase form. Go to Parm section and create a new part and give it a relevant name and its properties Properties: Data source: Attached data source with which workflow history is connected Data Source Relation: WorkflowTable.RelationName Name: Part name That’s it. Build the project and go the frontend and check the output how it looks like. Conclusion: It results as (we can scroll left and right to see all the tracking details list) Hurray, How pretty it looks like! In the above example, we have seen how we can develop factbox in Microsoft Dynamics 365 Finance and Operations. Thanks for reading and stay connected with us for more updates!!! Jagdish Solanki | Senior Technical Consultant | CloudFronts Business Empowering Solutions Team “Solving Complex Business Challenges with Microsoft Dynamics 365 & Power Platform”
Enable/Disable & Visibility an Action pane button on a list page using interaction class in D365
Introduction: In this blog, we will see how we can enable/disable or change the visibility of the form control in interaction class. Standard behavior of the form, system does not allow us to write code on form which comes under form template -> List page It Seems like below attached image (Here we will consider form VendTableListPage. Property of form as shown below) Each ListPage form consisting with an interaction class as shown in property, Here it is VendTableListInteraction. Each interaction class has one override method which is selectionchanged() Solution: Here we will override the method of selectionchanged() as below [ExtensionOf(classStr(VendTableListPageInteraction))] final class VendTableListPageInteractionCFSJSClass_Extension public void selectionChanged() { next selectionChanged(); //for visibility this.listPage().actionPaneControlVisible(formControlStr(VendTableListPage, ), false); //for enable/disable this.listPage().actionPaneControlEnabled(formControlStr(VendTableListPage, true); } For all other ListPage, we can go through interaction class. For reference, go through below mentioned classes: AgreementListPageInteraction BankDocumentTableListPageInteraction CatProcureOrderListPageInteraction CatVendorCatalogListPageInteraction CustBillOfExchEndorseListPageInteraction CustomsExportOrderListPageInteraction CustPDCListPageInteraction CustPDCSettleListPageInteraction CzCustAdvanceInvoiceListPageInteraction CzVendAdvanceInvoiceListPageInteraction EcoResCategoryHierarchyPageInteraction EcoResProductListPageInteraction EmplAdvTableListPageInteraction EntAssetObjectCalendarListPageInteraction EntAssetWorkOrderPurchaseListPageInteraction EntAssetWorkOrderPurchReqListPageInteraction EntAssetWorkOrderScheduleListPageInteraction EPRetailPickingListPageInteraction EPRetailStockCountListPageInteraction EximAuthorizationListPageInteraction EximDEPBListPageInteraction EximEPCGListPageInteraction GlobalAddBookListPageInteraction HcmCourseAttendeeListPageInteraction HcmWorkerAdvHoldTableListPageInteraction InventBatchJournalListPageInteraction InventDimListPageInteractionAdapter JmgProdStatusListPageInteraction JmgProjStatusListPageInteraction PCProductModelListPageInteraction PMFSeqReqRouteChangesListPageInteraction ProdBOMVendorListPageInteraction ProdRouteJobListPageInteraction ProdTableListPageInteraction ProjForecastListPageInteraction ProjInvoiceListPageInteraction ProjInvoiceProposalListPageInteraction ProjProjectContractsListPageInteraction ProjProjectsListPageInteraction projProjectTransListPageInteraction ProjUnpostedTransListPageInteraction PurchCORListPageInteraction PurchCORRejectsListPageInteraction PurchLineBackOrderListPageInteraction PurchReqTableListPageInteraction PurchRFQCaseTableListPageInteraction PurchRFQReplyTableListPageInteraction PurchRFQVendorListPageInteraction_PSN PurchRFQvendTableListPageInteraction PurchTableVersionListPageInteraction ReqTransActionListPageInteraction ReqTransFuturesListPageInteraction ReqTransListPageInteraction RetailOnlineChannelListPageInteraction RetailSPOnlineStoreListPageInteraction ReturnTableListPageInteraction SalesAgreementListPageInteraction SalesQuotationListPageInteraction SalesTableListPageInteraction SysListPageInteractionBase SysUserRequestListPageInteraction UserRequestExternalListPageInteraction UserRequestListPageInteraction VendEditInvoiceHeaderStagingListPageInteraction VendNotificationListPageInteraction VendPackingSlipJourListPageInteraction VendPDCListPageInteraction VendPDCSettleListPageInteraction VendProfileContactListPageInteraction VendPurchOrderJournalListPageInteraction VendRequestCategoryListPageInteraction VendRequestListPageInteraction VendRequestWorkerListPageInteraction VendTableListPageInteraction VendUnrealizedRevListPageInteraction Thanks for reading !!!
Extend a User-Created Table
Introduction: Microsoft Dynamics Business Central allows extending Pre-defined Tables, which is basically Customization and it is achieved using Extensions. Using Extensions developers can modify Pre-defined Tables according to requirements. But the extension of a Table can be done only if its “Extensible” property is set as True. This property is by default set as True for Tables. Now suppose a developer wants to extend a table that is created. Pre-requisites: VS Code AL Language Extension Microsoft Dynamics Business Central Solution: Step 1: Set the Extensible property of the Table that is supposed to be extended as shown below: In this case, the table to be extended is “Properties”. Extensible Property Step 2: Now go to Extension Management and get the AppID, Publisher, Name of App and Version as shown below: App Details Put the above details of App in the dependencies section of the new extension where the table is to be extended as shown below and download symbols: Dependencies Step 3: You can see that the “Properties” table is now available for extension. Here I have added a field “Extended Name” in the Properties Table. Also, that field can now be seen by accessing Properties Table by URL. Extended Table Thank you. Hope this helps!
Fetch FormControl and value of different type in Event Handler of D365 Operations
Introduction: In this blog article, we will see how we can fetch Form Control and its value which is of different datatype in EventHandler in D365 Operations Scenario: I am working on Global Address Book functionality for checking Duplicate values for PartyID (String), Tax Id (CheckBox) and Tax Id Type (ComboBox). I am using Event Handler of form method to enable a button based on value of above three fields. Steps: Create Event Handler with below code: [PostHandlerFor(formStr(DirPartyCheckDuplicate), formMethodStr(DirPartyCheckDuplicate, enableSearch))] public static void DirPartyCheckDuplicate_Post_enableSearch(XppPrePostArgs args) { FormRun formRun = args.getThis() as FormRun; FormCheckBoxControl TaxId = formRun.design(0).controlName(“TaxId”) as FormCheckBoxControl; FormStringControl PartyNumber = formRun.design(0).controlName(“DirPartyTable_PartyNumber”) as FormStringControl; FormComboBoxControl TaxIdType = formRun.design(0).controlName(“TaxIdType”) as FormComboBoxControl; FormControl searchBtn = formRun.design(0).controlName(“searchBtn”); if(TaxId.value() || PartyNumber.valueStr() || TaxIdType.valueStr()) { searchBtn.enabled(true); } else { searchBtn.enabled(false); } }
D365 Retail POS Customization – Adding Custom Column to Picking and Receiving View
Introduction: In D365 Retail POS, if you want to customize anything you need Extension Points. Over-layering is completely sealed. So, now if you want add custom columns to your View which is designed using code you can do it using Custom column extension. Each view has its own custom column interface which you can import and use to add columns. You can view the available Views for adding custom columns in ‘Pos.Api.d.ts’ file. Scenario: In Picking and Receiving, Update view you want to view details of Product variants like Size, Color and Config for all lines. Steps: Open ‘ModerPOS.sln’ from K:\RetailSDK\POS. Navigate to Pos.Extensions -> SampleExtensions -> ViewExtensions. Create a new Folder ‘PickingAndReceivingDetails’. In Folder, Add a TypeScript file and name it ‘CustomPickingAndReceivingListColumn’. Add the below code in file. //Added new column size, color and config; Also, take care of existing column by mentioning it else it will throw error //Note: Summation of ratio should be 100 import { IOrderLinesListColumn } from “PosApi/Extend/Views/PickingAndReceivingDetailsView”; import { ICustomColumnsContext } from “PosApi/Extend/Views/CustomListColumns”; import { ClientEntities } from “PosApi/Entities”; export default (context: ICustomColumnsContext): IOrderLinesListColumn[] => { return [ { title: “Product Number”, computeValue: (row: ClientEntities.IPickingAndReceivingOrderLine): string => { return row.productNumber; }, ratio: 15, collapseOrder: 9, minWidth: 60, isRightAligned: false }, { title: “Description”, computeValue: (row: ClientEntities.IPickingAndReceivingOrderLine): any => { return row.description; }, ratio: 30, collapseOrder: 8, minWidth: 70, isRightAligned: false }, { title: “Size”, computeValue: (row: ClientEntities.IPickingAndReceivingOrderLine): string => { return row.sizeTranslation; }, ratio: 5, collapseOrder: 7, minWidth: 40, isRightAligned: false }, { title: “Color”, computeValue: (row: ClientEntities.IPickingAndReceivingOrderLine): string => { return row.colorTranslation; }, ratio: 10, collapseOrder: 6, minWidth: 40, isRightAligned: false }, { title: “Config”, computeValue: (row: ClientEntities.IPickingAndReceivingOrderLine): string => { return row.configurationTranslation; }, ratio: 10, collapseOrder: 5, minWidth: 40, isRightAligned: false }, { title: “UOM”, computeValue: (row: ClientEntities.IPickingAndReceivingOrderLine): string => { return row.unitOfMeasure; }, ratio: 10, collapseOrder: 4, minWidth: 40, isRightAligned: true }, { title: “Quantity Ordered”, computeValue: (row: ClientEntities.IPickingAndReceivingOrderLine): any => { return row.quantityOrdered; }, ratio: 10, collapseOrder: 3, minWidth: 40, isRightAligned: true }, { title: “Quantity Received”, computeValue: (row: ClientEntities.IPickingAndReceivingOrderLine): any => { return row.quantityReceived; }, ratio: 5, collapseOrder: 2, minWidth: 40, isRightAligned: true }, { title: “Quantity Received Now”, computeValue: (row: ClientEntities.IPickingAndReceivingOrderLine): any => { return row.quantityReceivedNow; }, ratio: 5, collapseOrder: 1, minWidth: 40, isRightAligned: true } ]; }; Open manifest.json file and Add the View to manifest.json File inside the Views section. “PickingAndReceivingDetailsView”: { “orderLinesListConfiguration”: { “modulePath”: “ViewExtensions/PickingAndRecivingDetails/CustomPickingAndReceivingDListColumnExtension” } }, Build and Run the POS.