Category Archives: D365 Finance and Operations
Table Browser Extension for Google Chrome | D365
Now table browser becomes much easier for Microsoft Dynamics 365 Finance and Operations. Here you go with Google Chrome Extension – Table browser caller for D365FO. It’s very easy to install and use it. After installing the extension to the browser, it appears on the top bar and looks like While clicking on the extension, You can find the tab named with config where you need to put the URL of the respective environment and save it. Once config is setup, you need to go to the main tab that is Table Browser Caller as shown in above figure where you would setup mainly: Search for table name: name of the table Company Id: name of the legal entity After that, you need to find the table in the search box and just press the Enter key. And you will be redirected to the table in the new tab. In addition, Table browser has also few other features like Browse all table lists Browse all data entities 1. For getting the list of tables you need to click on Table list: Result as, 2. For getting the list of data entities you need to click on Data entities: Result as,
Share Story :
Set form control access via security role in D365 Finance
In some of the cases instead of providing security to whole form we need it for particular form control.So this blog will help you with providing access to form control via security roles.If you want to know more about security roles you can use my previous blog . First of all we need form control where we need to set some of the properties as follows. In our case we are using laid off button as shownNow select the button and press F4 for its properties and set needed permision to manual as follows Now in your desired security privilege you can either directly set form control permissions or Entry Points.For form control permission method right click on form control permission and select new form and after that set name property to your desired form (Hcmworker in our case) as follows Now right click on your form and select New control option as follows and set control name and permission for it as follows For Entry point method you need first need to add new entry point and set its object type and object name properties or for existing ones select desired entry point and click on drop down arrow and on controls right click and select new control.And now set its grant and name properties to desired control and its access rights After this you need to assign this privilege in desired security role and security duty as previously discussed in security role blog
Share Story :
Create security role in D365 Finance and operation
In D365 Finance and Operations when you need to provide and restrict users from a certain operation you can make use of security roles. You can create security roles from Finance and operations environment itself or from its development tool i.e Visual Studio. In this blog, we are going to create a security role in Visual Studio as follows. Create privilege First of all we need to create privilege as follows now we need to add new entry point and set object type in our case display menu item from properties Now add object name(display menu item name) as follows create role Now we need to create role where above created privilege will be needed create new security role as follows now we need to add new privilege in role as shown And from properties select privilege which we have created in previous step Create Duty Now we have to create new duty and assign previously created privilege in its properties as shown Now we can see security role in FnO environment select any user from system administration>>users and click on assign role as follows and now search for priviously created role and click on Ok button now your security role is assigned to user with our role will be able to see the object like form, report etc except user with system administrator.
Share Story :
Purchase order approval through a Mobile device in Microsoft D365 Fianance and Operations
In this blog I am going to explain in brief about the Purchase order approval mobile workspace. This workspace lets you view purchase orders and respond to them through actions. For example, you can approve or reject a purchase order. After a purchase order (PO) has been created, it might have to go through an approval process. After the vendor has agreed to the order, the PO is set to a status of Confirmed. POs that don’t use change management have a status of Approved as soon as they are created. A PO creates inventory transactions only when it reaches the Approved status. Once you’ve activated the Change management, approval workflow is introduced. As a system administrator, you must publish the Purchase order approval mobile work space To do that Click Settings> Mobile app. Select the mobile workspace to publish. Click Publish Now on your mobile go to Playstore and download Microsoft Dynamics 365 Unified Operations App Once you have downloaded the App and logged in you should see the Purchase order approval workspace on your Mobile App
Share Story :
x++ code to import data from excel to D365 FnO
We can also import data through code in D365 FO. Data import through code in D365 works differently than Ax2012 since cloud services. Import Class we are trying to import data from Excel to D365FO through the following code. using System.IO; using OfficeOpenXml; using OfficeOpenXml.ExcelPackage; using OfficeOpenXml.ExcelRange; class EmplAttendance { public void run() { this.updateDailyAttendance(); } void updateDailyAttendance() { System.IO.Stream stream; ExcelSpreadsheetName sheeet; FileUploadBuild fileUpload; DialogGroup dlgUploadGroup; FileUploadBuild fileUploadBuild; FormBuildControl formBuildControl; EmplAttendance_CFS emplTimeAttendance, insertTimeAttendance, updateTimeAttendance; COMVariantType type; Dialog dialog = new Dialog(“Daily Attendance Imported”); dlgUploadGroup = dialog.addGroup(“@SYS54759″); formBuildControl = dialog.formBuildDesign().control(dlgUploadGroup.name()); fileUploadBuild = formBuildControl.addControlEx(classstr(FileUpload), ‘Upload’); fileUploadBuild.style(FileUploadStyle::MinimalWithFilename); fileUploadBuild.fileTypesAccepted(‘.xlsx’); str COMVariant2Str(COMVariant _cv) { switch (_cv.variantType()) { case COMVariantType::VT_BSTR: return _cv.bStr(); case COMVariantType::VT_EMPTY: return ”; default: throw error(strfmt(“@SYS26908”, _cv.variantType())); } } if (dialog.run() && dialog.closedOk()) { FileUpload fileUploadControl = dialog.formRun().control(dialog.formRun().controlId(‘Upload’)); FileUploadTemporaryStorageResult fileUploadResult = fileUploadControl.getFileUploadResult(); if (fileUploadResult != null && fileUploadResult.getUploadStatus()) { stream = fileUploadResult.openResult(); using (ExcelPackage Package = new ExcelPackage(stream)) { int rowCount, i,columncount,j; Package.Load(stream); ExcelWorksheet worksheet = package.get_Workbook().get_Worksheets().get_Item(1); OfficeOpenXml.ExcelRange range = worksheet.Cells; rowCount = (worksheet.Dimension.End.Row) – (worksheet.Dimension.Start.Row) + 1; columncount = (worksheet.Dimension.End.Column); for (i = 2; i<= rowCount; i++) { str Emplid; TransDate WorkingDate; emplid = (range.get_Item(i, 1).value); WorkingDate = str2Date((range.get_Item(i, 2).value),123); select * from emplTimeAttendance where emplTimeAttendance.EmplId = = Emplid && emplTimeAttendance.WorkingDate = = WorkingDate; if(emplTimeAttendance) //if record already exists update it { emplTimeAttendance.selectForUpdate(true); emplTimeAttendance.Timein = any2Str(range.get_Item(i, 3).value); emplTimeAttendance.Timeout = any2Str(range.get_Item(i, 4).value); emplTimeAttendance.OT = any2Real(range.get_Item(i, 5).value); ttsbegin; emplTimeAttendance.update(); ttscommit; } Else //insert the new record { insertTimeAttendance.EmplId = (range.get_Item(i, 1).value); insertTimeAttendance.WorkingDate = str2Date((range.get_Item(i, 2).value),123); insertTimeAttendance.Timein = any2Str(range.get_Item(i, 3).value); insertTimeAttendance.Timeout = any2Str(range.get_Item(i, 4).value); insertTimeAttendance.OT = any2Real(range.get_Item(i, 5).value); insertTimeAttendance.insert(); } } } } else { error(“Error here”); } } } public static void main (Args args) { EmplAttendance emplDailyAttendanceImport; emplDailyAttendanceImport = new EmplAttendance (); emplDailyAttendanceImport.run(); } }
Share Story :
Customize Purchase order approval status
In the case of D365 Finance and Operations when you approve purchase requisition by default system creates Purchase order with approval status as “Approved” as follows To change this default behavior of system such that once purchase requisition is approved the approval status of the purchase order as a draft you can use the following class class CFSPOStatus { /// <summary> /// /// </summary> /// <param name=”args”></param> [PostHandlerFor(classStr(PurchAutoCreate_PurchReq), methodStr(PurchAutoCreate_PurchReq, endUpdate))] public static void PurchAutoCreate_PurchReq_Post_endUpdate(XppPrePostArgs args) { //PurchTable purchTable = args.getThis(‘purchTable’); PurchAutoCreate_PurchReq purchReq = args.getThis() as PurchAutoCreate_PurchReq; PurchTable purchTable, purchTablenew; purchTable = purchReq.parmPurchTable(); ttsbegin; select forupdate purchTablenew where purchTableNew.PurchId == purchTable.PurchId; if(purchTablenew && purchTablenew.DocumentState == VersioningDocumentState::Approved) { purchTablenew.DocumentState = VersioningDocumentState::Draft; purchTablenew.update(); } ttscommit; } }and your final result looks like And after changing status you can apply your own purchase order workflow on it. For purchase order workflow you can refer to my blog
Share Story :
Steps to Configure Environments through Life Cycle Services (LCS)
Configuration of Environment through LCS. After we purchase licence, Login the LCS through Admin account. You can see the follow link to complete setup environment. Before configuring the environments there are some pre-requisites need to be performed. Declaration of project milestone. Click on setup milestone, Enter the end date for each milestone and save. 2. VSTS Setup. Before this we need to follow the below steps: Login in Azure DevOps. Create a project. 3. Create personal access token. Save this token. Click on “Setup Visual Studio Team Services” a. Enter the site Enter the AzureDevOps url, which consists of https://organizationname.visualstudio.com/ and click on continue. Enter Personal access token generated above in Azure DevOps. b. Select the project Select the project from the list and click continue. c. Review and Save 3. Project configuration and project on-boarding. Click on “Complete project configuration”(This is one time setup) And click on “Project onboarding” Check all the 12 points by clicking on next and then finish the complete onboarding review page. And click on configure button of environment Enter the name of environment and select the region. Then you can see the status of environment in queued state. After 7-8 hours you can login to your environment.
Share Story :
Develop Custom Workflow:Counting Journals workflow
In this blog, you will learn how to develop a custom workflow that is not present out of the box in D365 Finance. For this blog I’m creating a workflow for Counting Journal (Inventory management>>Journal Entries>>Item Counting>>Counting) because there is no such workflow for inventory management module. The followings are steps that are to be followed. Steps:- 1. Create a base Enum for Document Status 2. Create a table extension and add Enum to table 3. Add document status field to form extension 4. Create query 5. Create workflow category 6. Create a workflow type 7. Now add can submit workflow and updateworkflow methods to tables class extension 8. Update submitmanager class 9. Update EventHandler class 10. Workflow approval creation 11. Add an element to workflow Type 12. Now add workflow setup form to the inventory management module Now we are performing steps in detail 1. Create a base enum for Document Status Make sure you have created a solution, project and assign the model to the project. Now add new item and select Base Enum. And Add Base Enum and name it as CFS_InventoryCountingWorkflow 2. Create a table extension and add enum to table We are creating a workflow for inventory management so we need to create an extension of InventoryJournalTable and drag above created base enum to table which will create a new field of type Enum. 3. Add Document status field to form extension Now we need to create an extension of form InventJournalCount and add newly created table field to forms grid by dragging it from data source to form grid control and assign label as approval status. 4. Create query Now again add a new query to project and name it as CFS_InventoryCountingWorkflow and add the InventJournalTable and set properties as follows 5. Create workflow category Now we are going to add Workflow category to project and name it as CFS_InventJournalCounting and set the properties as follows 6. Create a workflow type After adding workflow category its time to add workflow type name it as CFS_InventoryJournalCounting and set its properties as follows this will create new elements such as classes and action menu items for submit and all actions. 7. Now add can submit workflow and updateworkflow methods to tables To add a method to the table we need to create a table class extension for that add a new class and name it as InventJournalTable_CFSExtension and need to add updateWorkflow and canSubmitWorkflow methods. You can use the following code [Extensionof(tableStr(InventJournalTable))] final class InventJournalTable_Extension { public boolean canSubmitToWorkflow(str _workflowType) { boolean ret = next cansubmitToWorkflow(_workflowType); ret = this.CFS_InventoryCountingWorkflow == CFS_InventoryCountingWorkflow::Draft; return ret; } public static void updateWorkflowStatus(RecId _documentRecId, CFS_InventoryCountingWorkflow _status) { ttsbegin; InventJournalTable document; update_recordset document setting CFS_InventoryCountingWorkflow = _status where document.RecId == _documentRecId; ttscommit; } } 8. Update submitmanager class Make sure you have the same name for submitting manager class or rename it as follows and following code to that public class CFS_InventoryJournalCountingSubmitManager { private InventJournalTable document; private WorkflowVersionTable versionTable; private WorkflowComment comment; private WorkflowWorkItemTable workItem; private SysUserId userId; private boolean isSubmission; private WorkflowTypeName workflowType; public static void main(Args args) { // TODO: Write code to execute once a work item is submitted. if (args.record().TableId != tableNum(InventJournalTable)) { throw error(‘Error attempting to submit document’); } InventJournalTable document = args.record(); FormRun caller = args.caller() as FormRun; boolean isSubmission = args.parmEnum(); MenuItemName menuItem = args.menuItemName(); CFS_InventoryJournalCountingSubmitManager manager = CFS_InventoryJournalCountingSubmitManager::construct(); manager.init(document, isSubmission, caller.getActiveWorkflowConfiguration(), caller.getActiveWorkflowWorkItem()); if (manager.openSubmitDialog(menuItem)) { manager.performSubmit(menuItem); } caller.updateWorkflowControls(); } /// <summary> /// Construct method /// </summary> /// <returns>new instance of submission manager</returns> public static CFS_InventoryJournalCountingSubmitManager construct() { return new CFS_InventoryJournalCountingSubmitManager(); } /// <summary> /// parameter method for document /// </summary> /// <param name = “_document”>new document value</param> /// <returns>current document</returns> public Inventjournaltable parmDocument(Inventjournaltable _document = document) { document = _document; return document; } /// <summary> /// parameter method for version /// </summary> /// <param name = “_versionTable”>new version table value</param> /// <returns>current version table</returns> public WorkflowVersionTable parmVersionTable(WorkflowVersionTable _versionTable = versionTable) { versionTable = _versionTable; return versionTable; } /// <summary> /// parameter method for comment /// </summary> /// <param name = “_comment”>new comment value</param> /// <returns>current comment value</returns> public WorkflowComment parmComment(WorkflowComment _comment = comment) { comment = _comment; return comment; } /// <summary> /// parameter method for work item /// </summary> /// <param name = “_workItem”>new work item value</param> /// <returns>current work item value</returns> public WorkflowWorkItemTable parmWorkItem(WorkflowWorkItemTable _workItem = workItem) { workItem = _workItem; return workItem; } /// <summary> /// parameter method for user /// </summary> /// <param name = “_userId”>new user value</param> /// <returns>current user value</returns> public SysUserId parmUserId(SysUserId _userId = userId) { userId = _userId; return userId; } /// <summary> /// parameter method for isSubmission flag /// </summary> /// <param name = “_isSubmission”>flag value</param> /// <returns>current flag value</returns> public boolean parmIsSubmission(boolean _isSubmission = isSubmission) { isSubmission = _isSubmission; return isSubmission; } /// <summary> /// parameter method for workflow type /// </summary> /// <param name = “_workflowType”>new workflow type value</param> /// <returns>current workflow type</returns> public WorkflowTypeName parmWorkflowType(WorkflowTypeName _workflowType = workflowType) { workflowType = _workflowType; return workflowType; } /// <summary> /// Opens the submit dialog and returns result /// </summary> /// <returns>true if dialog closed okay</returns> protected boolean openSubmitDialog(MenuItemName _menuItemName) { if (isSubmission) { return … Continue reading Develop Custom Workflow:Counting Journals workflow
Share Story :
How to Add Workflow form for D365 finance and Operation modules
In D365 Finance and Operation for some modules, there is no Workflow setup. eg:- Inventory management module. In such a case, we need to perform the following steps after which you can see the workflow setup form which will include all the workflows for that specific module. First, we need to add the Display menu item and set properties as: Enum Type parameter to ModuleAxapta and Enum Parameter to the module ( in our case Inventory ) Object Type to form. Object to WorkflowtableListPageRnr After this create a menu extension of the module where we need to place the form. Drag the display menu item to the menu extension. After a successful build, we are set to enlist new workflows for an inventory module using workflow forms. The same way you can attach workflow form to the new module as follows:- Create an extension of ModuleAxapta Base Enum Add a new element to base enum and name it your custom module name and label it Create a new Display Menu Item and set its properties as follows Create a new menu and set its label and name as per your requirement And insert your display menu item to your custom menu/module Create an extension of “MainMenu” Menu and add new menu item reference and set its properties as follows Build the solution your Workflow setup form will be visible for that module
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.
