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);
}
}
Ledger Voucher creation Framework and x++ code to create ledger voucher
Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension-...
-
{ "Message" : "Please verify that the user is valid and set up correctly." } Sol: System Administration > Se...
-
Please click here to access Custom Workflow step by step process:
-
FormRun formRun = sender.formRun(); Object inventTrans_ds = formRun.dataSource(formDataSourceStr(InventMarking,InventTransO...