step1: Create a form and apply form pattern as wizard step2 : create a class and extend the class with SysWizard. code : class BAS_WIzardScreen extends SysWizard { #MACROLIB.AviFiles FormName formname() { return formstr(BAS_WIzardForm); // name of the wizard form } public void run() { info(strFmt("Thankyou")); } public void setupNavigation() { } public boolean validate() { return true; } public static str description() { return "BASOFA WIZARD"; // title of the wizard } public static void main(Args _args) { BAS_WIzardScreen wizard = new BAS_WIz...
In Microsoft Dynamics AX, you can post trade agreement journals automatically using X++ code. Here are the steps to do so: Create a new job in X++. Write a code to fetch data from the trade agreement table. Create a journal header and journal lines based on the fetched data. Call the post() method of the journal header to post the journal. Repeat steps 2 to 4 for each trade agreement. Here's a sample code in X++: static void postTradeAgreementJournals(Args _args) { TradeAgreementTable tradeAgreementTable; GeneralJournalHeader generalJournalHeader; GeneralJournalLine generalJournalLine; // Fetch data from the Trade Agreement table select tradeAgreementTable where tradeAgreementTable.JournalPosting == NoYes::No; // Loop through each trade agreement while (tradeAgreementTable) { // Create a journal header generalJournalHeader = new GeneralJournalHeader(); generalJournalHeader.initValue(); generalJournalHeader.tra...
Reuirement : I have to create a table called BASTradeAgreementTable with fields like following Item number Product Name ToDate FromDate InventSiteId InventLocationId Amount From Unit Step2: After Creating Table I have to create a form and add the created table into the form datasource and add all the fields of that datasource to form grid. I have to create a button called Post whenever user clicks on that button i have to create and post Trade Agreement Journals with the data provided in the form grid. [Control("Button")] class Post { /// <summary> /// /// </summary> public void clicked() { int recordsCount; BASTradeAgreementTable tradeAgreement; ...
Comments
Post a Comment