Posts

Collection list page in sales ledger

If collections list page form in sales ledger/commom/collections does not show data. Make sure and run customer ageing snapshot in sales ledger/periodic

CLR Error - AX 2012

When you have visual studio projects added to AX. Errors may occur at different times when generating CIL. Error - Object synchronization method was called from an unsynchronized block of code. restart AOS  Run full CIL Error  - assembly containing type is not referenced Check the assembly .dll file is in the server/vsassemblies folder. Check if you can access the assembly in a x++ job and you are able to call the methods. Add the AOS account to the assembly in above folder.

XPO import error

When importing a XPO, if following error occurs "table, enum, edt, object already exists. import aborted". Solution 1 Restart AOS Sync data dictionary Try importing again Solution 2 Goto tools/Caches--refresh all. Try importing again. It should work

X++ Confirm, Invoice and cancel purchase order

static void POConfirm(Args _args) {     PurchTable      pTable;     PurchFormLetter purchFormLetter;     AxPurchTable    axPurchTable;         select pTable where pTable.PurchId == "POnumber";         //Posting PO Confirmation     //You cannot do invoice without doing PO confirm     //purchTable = axPurchTable.purchTable();     purchFormLetter = PurchFormLetter::construct(DocumentStatus::PurchaseOrder);     purchFormLetter.update(pTable, strFmt("%1", pTable.PurchId));     //Posting PO Invoice    // purchFormLetter = PurchFormLetter::construct(DocumentStatus::Invoice);     //purchFormLetter.update(pTable, strFmt("%1", pTable.PurchId));  } Cancel a PO static void cancelPO(Args _args) {     PurchTable      pTable;     PurchCancel     pCancel;     xArgs           _xar;     _xar = new xArgs();     select forUpdate pTable where pTable.PurchId == "PO number";     {         if(pTable.PurchStatus == PurchStatus::Backord

GAB HR Worker access security

Global address book has all the workers, contacts, suppliers, customers info and also if a contact is been created and if HR wants to hire that contact(person). We can change that contact as worker from GAB itself. GAB has most of worker data as public, any one with GAB access can change the worker info like name and it is updated in HR module. if a worker address book is created and assigned to all the workers. A team is created, who has only access to that address book(like HR team). If we enable the security policy in org admin GAB parameters A user not in the HR team cannot see the workers in other modules like Procurement and project. As this will lock down workers not only in GAB nut also in other modules. Solution is to lock the edit property for the contacts in the GAB if he is a worker.

X++ Look ups - Existing form as a field lookup in another form

Option 1: A new field is added and that should show an already created form as its lookup. Create a new form with datasources and design. In design properties give window type = content page, style - lookup In the main form to get existing form as lookup, create a new form control and override lookup method as below. public void lookup() {    SysTableLookup          sysTableLookup ;     Query                   query           = new Query();     QueryBuildDataSource    queryBuildDataSource;     QueryBuildRange         queryBuildRange;     DimensionValue  value;     Args args;     FormRun formRun;     ;     args = new Args();     args.name("HcmWorkerEligibleLookup");     args.record(PurchReqTable);     args.parmEnum(NoYes::Yes); //     args.caller(this); //     formRun = classFactory.formRunClass(args);     formRun.init();     formRun.run();     formRun.detach();     this.performFormLookup(formRun); } In the main form init method, add below cod

X++ Job to update worker contact information by excel upload

Upload a excel file to update the already existing Worker contact information HR/Common/Workers/List Edit/Profile->Contact Information. Note: In the Excel file all the columns should be formatted as Text and the fields should be given according to below header format. PersonnelNumber, contactdescription, contacttype,contact,contactext,primarycontact,privatecontact 123,abc, email address, abcxyz@blogger.com, ,yes,no static void EmployeeContactInfo(Args _args) {     SysExcelApplication application;     SysExcelWorkbooks workbooks;     SysExcelWorkbook workbook;     SysExcelWorksheets worksheets;     SysExcelWorksheet worksheet;     SysExcelCells cells;     COMVariantType type;     System.DateTime ShlefDate;     FilenameOpen filename,filenameopen;     dialogField dialogFilename;     Dialog dialog;     LogisticsLocation logisticsLocation   ;     LogisticsElectronicAddress logisticsElectronicAddress;     DirPartyLocation dirPartyLocation;     HcmWorker hcmWorke