Showing posts with label CLASSES AND TABLES WHILE CREATING SALES ORDER. Show all posts
Showing posts with label CLASSES AND TABLES WHILE CREATING SALES ORDER. Show all posts

Wednesday, April 13, 2016

HOW TO Open filtered forms with X++

Open filtered forms with X++

When using forms in Dynamics AX we usually get access to them by clicking a button that uses a menu item, this along with the args that is sent we get a form that displays the requested information. But if you want to do this using code, how is this done?

You usually see this used in classes such as SalesFormLetter or PurchFormLetter that uses an existing form instead of a creating a temporary one. The user enters the information and the class uses the new information to perform the tasks at hand.

This is a pretty simple job that first displays a filtered CustTable form for the customer “4004”, when this form is closed the CustTrans form will be opened and display the relevant data of the customer we are using. As this is done you will also see that it’s possible to either halt the code while a form is open or simply detach it and let the code continue.

static void OpenFilteredForms(Args _args)
{
Args argsCust, argsTrans;
FormRun formRun, formRun2;
CustTable custTable = CustTable::find("2123");
;

argsCust = new Args(formStr(CustTable));
argsCust.record(custTable);

formRun = classFactory.formRunClass(argsCust);
formRun.init();
formRun.run();
formRun.wait();


argsTrans = new Args(formStr(CustTrans));
argsTrans.record(custTable);

formRun2 = classFactory.formRunClass(argsTrans);
formRun2.init();
formRun2.run();
formRun2.detach();

print "This should be printed as " +
"the CustTrans form opens.";
pause;

}

Tuesday, April 12, 2016

CLASSES , TABLES ,FORMS AND METHODS WHILE CREATING SALES ORDER AX X++

CLASSES AND TABLES WHILE CREATING SALES 

ORDER 

Below are the list of tables and classes being executed in a sales order cycle.
Similar is the case for purchase order

Sales Order (Confirmation, Picking list, Packing slip, Invoice )

Creating Sales Order
-------------------------

Classes :- SalesTableType and SaleslineType classes  will get called while creating the orders.
Tables  :- Sales Table, Logistics Postal Address, CustTable, MCRPrimaryAddressCust,SalesLine.

Confirmation
--------------------
Classes :- SalesFormLetter class

Tables  :- SalesParmTable, SalesParmLine Table
CustConfirmJour Table, CustConfirmTrans Table- when a sales order gets confirmed.


SalesFormLetter classes will be used to post the sales order at various document status like picking,packing, invoice etc.

Picking List
---------------
Classes :- SalesFormLetter_PickingList class

 Tables :- SalesTable, SalesParm Tables

Packing List
---------------
Classes :-SalesFormLetter_PackingSlip class

Tables  :-SalesTable, Salesparm Tables

CustPackingSlipJour, CustPackingSlipTrans  when a packing slip is posted.

Invoice
---------
Classes :- SalesFormLetter_Invoice class

CustInvoiceTable, CustInvoiceTrans when invoice is posted.

SalesOrder Classes and Tables:

SalesTableType and SaleslineType classes will get called while creating the SalesOrders.
SalesFormLetter_Confirm
SalesFormLetter_Invoice
SalesFormLetter_PackingSlip
SalesFormLetter_PickingLlst
classes will be used to post the sales order at various document status (packing, invoice etc).
Tables:
SalesTable contains all SalesOrder headers regardless whether they have been posted or not.
The SalesParmTable and SalesParmLine contains detailed information regarding posting sales headers and Lines.
CustConfirmJour and CustConfirmTrans tables contains all Sales Confirmation headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines.
CustPackingSlipJour and CustPackingSlipTrans tables contains all sales PackingSlip headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines.
CustInvoiceJour and CustInvoiceTrans tables contains all sales all Sales Invoice headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines.

Purchase Order classes and Tables:


PurchTableType and PurchTableLine classes will get called while creating the PurchaseOrders.
PurchFormLetter_PurchOrder
PurchFormLetter_ApproveJournal
PurchFormLetter_Invoice
PurchFormLetter_PackingSlip
PurchFormLetter_ReceiptsList
classes will be used to post the PurchaseOrder at various document status (packing, invoice etc).
Tables:
PurchTable contains all purchase order headers regardless whether they have been posted or not.
PurchParmTable and PurchParmLine contains detailed information regarding posting Purchase headers and Lines.
VendPackingSlipJour and VendPackingSlipTrans tables contains posted packingslip headers and lines.
VendInvoiceJour and VendInvoiceTrans tables contains all invoiced purchase order headers and Lines.
VendReceiptsJour and VendReceiptsTrans tables contains posted receipt header and lines.
VendPurchOrderJour and VendPurchOrderTrans tables contains Purchase requisition headers and lines.


Classes, Tables, Forms and Methods used to post the sales orders 


SalesTableType and SaleslineType classes will get called while creating the orders.
SalesFormLetter* classes will be used to post the sales order at various document status(packing, invoice etc).
SalesParm* tables are used to prepare the data for posting
CustConfirmJour, CustConfirmTrans - when a sales order gets confirmed
CustPackingSlipJour, CustPackingSlipTrans - when a packing slip is posted.
CustInvoiceTable,CustInvoiceTrans - when an invoice is posted.
Related Posts Plugin for WordPress, Blogger...