Posts

Showing posts from 2023

D365FO Model Management (export, Import and delete)

Image
  Sometimes D365FO developers facing the task to import, export, or delete models. Some ISV solutions are provided as model files, which contain programmable objects (metadata and code) and related resources. Also, all the systems customizations should be created in a model. In this blog post we will learn how to management models, using the Fleet Management Extension model as an example. A model is a group of elements, such as metadata and source files, that typically constitute a distributable software solution and includes customizations of an existing solution. Also, a model is a design-time concept, for example a warehouse management model or a project accounting model. A model always belongs to a package. A package is a deployment and compilation unit of one or more models. It includes model metadata, binaries, and other associated resources. One or more packages can be packaged into a deployable package, which is the vehicle used for deployment on runtime environments. ...

Restore Database in Tier 1 envrioment

Image
  2.  Create new database. After you connected to your work server in SSMS(Microsoft SQL Server management Studio) you need to Right click on Databases folder and choose “Restore database”. In table 1 are show settings for database restoration. This process will create a new database called AxDB _ new. Table 1. Settings for database restoration Picture 2. Restore database 3.  Run script to alter database. After performing steps above, you need to change current main database to imported one. To perform this operation use script below: --set main db to single connections and drop the existing connections ALTER DATABASE AxDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE --rename datbase to db_old ALTER DATABASE AxDB MODIFY NAME = AxDB_old --set the old db to multi user ALTER DATABASE AxDB_old SET MULTI_USER --rename the new db to the main db name ALTER DATABASE AxDB_new MODIFY NAME = AxDB   Now your environment is ready to perform data upgrade operation.

MS Dynamics 365 FO Business Events (Po confirm without workflow ) notification

Image
  Business events provide a way to alert external systems when a business process is performed in D365 FO (Finance & Operations). There are two types of business action: Workflow action Non-workflow action Business events can be viewed in  System administration > Setup > Business events > Business events catalog Business events with Category name starting with “Workflow” belong to the workflow category. For non-workflow, the Category name is normally the same as the name of their module. Endpoints let you define the destination for sending the business events. There are five types of endpoint: Azure Service Bus Queue Azure Service Bus Topic Azure Event Grid Azure Event Hub HTTPS Microsoft Power Automate In the example below, we are going to use the Microsoft Power Automate endpoint. Example: For this example, we are going to use the non-workflow action business event “Purchase order confirmed”. Login to  https://us.flow.microsoft.com/ . Go to  MyFlow ...

Delegation to another user of your workflow items in D365FO / AX

I need to reassign a work item from one user to another because the original user who was assigned the task has left the company. The client also requires that we track the workflow history as we reassign the work item. Final class NGDelegateWorkFlowJob {     /// <summary>     /// Class entry point. The system will call this method when a designated menu      /// is selected or when execution starts and this class is set as the startup class.     /// </summary>     /// <param name = "_args">The specified arguments.</param>     public static void main(Args _args)     {         PurchTable            purchTable;         HcmJob                hcmJob;         WorkflowWorkItemTable workflowWorkItemTable;         WorkflowWorkItemActionType actionTyp...

Adding a new Financial Dimension tab in purchase requisition form in D365 FO

Image
  Adding a new Financial Dimension tab in the purchase requisition form in D365 FO.  For the Purchase requisition table "Save Data per company" is set  No . So we need to add some extra code. For the Line table in standard they have developed. I took the reference from there. Step 1: Add dimension field in Table. Step 2: Add dimension control in the form. In  form   init  method. [ExtensionOf(formStr(PurchReqTable))] final class PurchReqTable_Extension {     public void init()     {         next init();         DimensionEntryControl   fCC = DimensionEntryControl as DimensionEntryControl;         fCC.parmValidateBlockedForManualEntry(true);          }  } DataSource   Active  method. [FormDataSourceEventHandler(formDataSourceStr(PurchReqTable, ...

SQL script to retrieve the list of active users with license details D365 FnO

  Hi guys, I am writing this blog to share the information regarding active users license details in D365 FnO.  Below is the SQL script that will fetch list of active users, roles and their license details. ============================================================== Select userId.ID as "User id",     userId.NAME as "User name",     securityRole.NAME AS "Role name",     securityRole.description AS "Role description",     ISNULL(internalOrganization.NAME,'All') as "Legal entity",     (CASE securityRole.USERLICENSETYPE     WHEN 4 Then 'Operations'     WHEN 6 Then 'Team Members'     WHEN 7 Then 'Activity'     Else 'Unknown' end) as "License type"     from userInfo userid     inner JOIN SECURITYUSERROLE UserRole     on UserRole.USER_ = userid.ID     inner JOIN AXDB.dbo.SECURITYROLE securityRole     on securityRole.RecId = UserRole.SecurityRo...

Asset reservation posting class with mutiple method

 class IHSReserveEAAssets {     IHSAssetMovementHeader      ihsAssetMovementHeader;     EntAssetRequestTable        entAssetRequestTable;     str                         output;     boolean                     checkToStatus;     boolean                     getToStatus;     EntAssetWorkOrderTable      workOrderTable;     EntAssetWorkOrderTable      workOrderTablePerformWork;     EntAssetWorkOrderTable      workOrderTableQualityCheck;     EntAssetWorkOrderRecID      materialWorkOrderRecid;     EntAssetWorkOrderRecID      performWorkOrderRecid;     EntAssetWorkOrderRecID      qualit...