This blog is for Dynamics AX (AXAPTA) Developers,this will help you for your development issues. This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use.
25 February 2023
13 February 2023
Form control value versioning view Manager and make bold the modified value in Form Control in D365 FO
x++ code to set bold of field value based on the modification in D365FO Form control
Form : PurchVendorPortalResponses
private void registerForChangeTracking()
{
viewManager = VersioningDocumentViewManager::construct();
viewManager.registerDataContainerForDataSource(PurchaseOrderResponseHeader_DS,
VersioningDocumentViewDataContainer::constructFromDataSource(
PurchaseOrderResponseHeader_DS,
[fieldStr(PurchaseOrderResponseHeaderAllVersions, PurchTableVersion)],
fieldStr(PurchaseOrderResponseHeaderAllVersions, VersionDateTime),
new PurchaseOrderResponseHeaderMapper()));
viewManager.registerDataContainerForDataSource(PurchaseOrderResponseLine_DS,
VersioningDocumentViewDataContainer::constructFromDataSource(
PurchaseOrderResponseLine_DS,
[fieldStr(PurchaseOrderResponseLineAllVersions, PurchTableVersion),
fieldStr(PurchaseOrderResponseLineAllVersions, PurchaseOrderResponseLine)],
fieldStr(PurchaseOrderResponseLineAllVersions, VersionDateTime),
new PurchaseOrderResponseLineMapper()));
viewManager.registerControlForTracking(PurchaseOrderResponseHeader_DlvTerm);
viewManager.registerControlForTracking(PurchaseOrderResponseHeader_DlvMode);
viewManager.registerControlForTracking(PurchaseOrderResponseHeader_VendorRef);
viewManager.registerControlForTracking(PurchaseOrderResponseLine_PurchQty);
viewManager.registerControlForTracking(PurchaseOrderResponseLine_ConfirmedDlv);
viewManager.registerControlForTracking(PurchaseOrderResponseLine_ExternalItemId);
viewManager.registerControlForTracking(PurchaseOrderResponseLine_Name);
}
=====
Extension to add extra feild.
/// <summary>
///
/// </summary>
[ExtensionOf(formstr(PurchVendorPortalResponses))]
final class TestPurchVendorPortalResponses_Extension
{
/// <summary>
///
/// </summary>
public void init()
{
next init();
viewManager.registerControlForTracking(PurchaseOrderResponseLine_PurchPrice);
}
}
====
Similarly:
Form: PurchVendorPortalAllResponse
Method: registerForChangeTracking()
Extenion to add new control for tracking and bold:
[ExtensionOf(formstr(PurchVendorPortalAllResponse))]
final class TestPurchVendorPortalAllResponse_Extension
{
public void init()
{
next init();
VersioningDocumentViewManager viewManager = this.getViewManager();
viewManager.registerControlForTracking(PurchaseOrderResponseLineAllVersions_PurchPrice);
}
}
DB restore production DB to DEV environment in D365 FO using Bacpac file
https://www.linkedin.com/pulse/restore-production-database-dev-environment-d365fo-using-abbas-tfwbe SQLPackage link : https://www.linkedin...
-
static void createForm(Args _args) { Args args; Form form; FormRun formRun; FormBuildDesign formBuildDesign; FormB...
-
Please click here to access Custom Workflow step by step process:
-
1. In classDeclaration extend SrsReportDataProviderPreProcess instead of SrsReportDataProviderBase 2. Temp table properties should b...