Skip to main content

Posts

Query link and query build datasource example in MSD axapta

Query link and query build datasource example static void QueryLinks(Args _args) { Query query = new Query(queryStr(custtable));//Give your query name as in AOT... void getLinks(QueryBuildDatasource _qbds) { QueryBuildDataSource childDataSource; QueryBuildLink queryBuildLink; Counter links; int i; ; if (_qbds.enabled()) { setPrefix (tableId2Name(_qbds.table())); if(_qbds.level() > 1) { while (links < _qbds.linkCount()) { links++; queryBuildLink = _qbds.link(links); info(strFmt("%1.%2 --> %3.%4", tableId2Name(queryBuildLink.relatedTable()), fieldId2Name(queryBuildLink.relatedTable(), queryBuildLink.relatedField()), tableId2Name(queryBuildLink.table()), fieldId2Name(queryBuildLink.table(),queryBuildLink.field()))); } } for (i = 1; i <= _qbds.childDataSourceCount(); i++) { childDataSource = _qbds.childDataSourceNo(i); getLinks(childDataSource); } } } ; setPrefix(

Upload an image in a form window control in MSD axapta

Upload an image in a form window control str filename; FileNameFilter filter = ['JPG files','*.jpg']; Bindata binData; Image signatureImage = new Image(); super(); filename = Winapi::getOpenFileName(element.hWnd(), filter, '', "Upload your image", '', ''); binData = new BinData(); if (binData.loadFile(filename)) { signatureImage = binData.getData(); FormWindowCOntrol.image(signatureImage); FormWindowCOntrol.widthValue(signatureImage.width()); FormWindowCOntrol.heightValue(signatureImage.height()); element.resetSize(); element.unLock(); }

Good training institute for Microsoft dynamics axapta

Good training institute for Microsoft dynamics 1.Emporis Academy Pvt Ltd I had gone training in Morphx Development in Emporis Academy Pvt Ltd which is located in Chennai. Only Microsoft partner in India who is giving training in LIVE for both Functional and Technical. Really nice experience, they had give me lot of inputs, you just enquire them 2. Nowadays we were able to see, many companies authorizing themselves us Microsoft Certified Partner. I strongly advise you to get trained from MS learning solutions Competency Partners. Only a Microsoft Partner can provide you a Microsoft courseware and intensive lab training will be provided as per the guidelines of Microsoft. Only a partner will give training using genuine software with full features of the product which is specially designed to give training on that product.

Set fiscal year periods in Microsoft dynamics axapta

Set fiscal year periods in dynamics axapta In periods of screen, choose the button Create fiscal year .If the system already exists a prior period created the new AX suggests the beginning and closing dates of the new fiscal year.If by chance the first period is to be created, you should fill these dates. Then put the length of the period as a unit and then, put month as per requirement .

delete rows from the field order from Credit note in MSD Axapta

If you have created a credit note in AX, you can do it in a sales order or purchase order separately or in original order. An important detail when we are creating a credit note in the original order is the field delete rows in the order that appears on the screen after using the button functions option to create a credit note . If you leave this field  as selected, it will delete the transaction's original order, keeping only the line of credit note that you are creating. So, if it is worthwhile keeping in the same order the history of the original transaction and the credit note you can  clear this option.

Resolving problem of unbalances tts in MSD Axapta

Resolving problem of unbalances tts Sometimes when we're debugging, for some reason have not completed the sequence of TTS ttsbegins and left more than it should, I get the AX to give you messages saying he found a pair of unbalanced TTSBEGIN / TTSCOMMIT and solve just create a job with a ttsabort. while (appl.ttsLevel() > 0) ttsAbort;

Microsoft Dynamics AX 2009 Rollup 5

Dynamics AX 2009 Rollup 5 The featurs are available: NF-Update to version 2.0 and web services SEFAZ Calculation of tax invoice register Import Invoice register transfer ICMS (new process does not use purchase orders, bill of sale or free text) Control page numbering and printing of books for daily books, reason, balance sheet and financial statement (income statement and balance sheet) Text configuration transaction (historical accounting) automatic pay lines of customers and suppliers. Updates on the integration tax Prohibiting the use of non-numeric characters in the number of purchase invoice

Import and Export using the class CommaIO in MSDAX

Import and Export using the class CommaIO static void commaIoRead(Args _args) { #File Dialog dialog = new Dialog("Importer"); DialogField dialogFieldCaminho; CommaIo commaIo; FileIoPermission fileIoPermission; Container filtro = ["txt", #AllFilesName+#txt], readCon; TimesFutebol timesFutebol; //Table Buffer ; dialog.filenameLookupFilter(filtro); dialogFieldCaminho = dialog.addField(TypeId(FileNameOpen), "Select"); if(dialog.run()) { fileIoPermission = new fileIoPermission(dialogFieldCaminho.value(), #io_read); fileIoPermission.assert(); commaIo = new CommaIo(dialogFieldCaminho.value(), #io_read); commaIo.inFieldDelimiter(";"); if(commaIo) { try { while(commaIo.status() == IO_Status::Ok) { readCon = commaIo.read(); if(conlen(readCon) > 0)

Code to get all object of project node using MSD axapta

Code to get all object of project node using axapta static void listAllObjectosFromProject(Args _args) { ProjName projName = "ListProjectNode_ABC"; ProjectListNode list = infolog.projectRootNode().AOTfindChild("Shared"); TreeNodeIterator ir = list.AOTiterator(); ProjectNode pnProj; ProjectNode pn = list.AOTfindChild(projName); void searchAllObj(projectNode rootNode) { #TreeNodeSysNodeType TreeNode childNode; TreeNodeIterator rootNodeIterator; ; if (rootNode) { rootNodeIterator = rootNode.AOTiterator(); childNode = rootNodeIterator.next(); while (childnode) { if (childNode.AOTgetNodeType() == #NT_PROJECT_GROUP) searchAllObj(childNode); else info(strfmt("Grupo:%1 - Objeto: %2", rootNode.AOTname(), childNode.AOTname())); childNode = rootNodeIterator

Test Driven Development in MSD Axapta

There is much talk of developing a technique called Test Driven Development(TDD), where the developer to implement your code before it creates the test, to later create your code based test.o from AX 4.0 Microsoft has implemented a framework to assist in this type of methodology is called "SysTest." SysTest Systest Unit Test is a framework, and who has worked with J Unit or Unit-test others will not have much difficulty. Main features / objectives: It is very fast Provides rich set of "assert" methods Supports testing of exceptions Supports transactions It supports the company's accounts Supports test suites Supports inserting and deleting method suite that runs before the first method and then the last. It supports code coverage Tools for quick Test Suite I'll put down an example of using the framework SysTest: First of all you must enable the special toolbar framework, Tools; Development Tools; Unit Test; Show Toolbar. Create

writing error in windows event viewer using MSD axapta

You can use this job to put in its class to write a warning or error in windows event viewer System.Diagnostics.EventLog eventLog; LogText nameLog = "Dynamics AX India"; LogText sourceLog = "Log test"; ; if(!System.Diagnostics.EventLog::SourceExists(sourceLog)) { System.Diagnostics.EventLog::CreateEventSource(sourceLog, nameLog); } eventlog = new System.Diagnostics.EventLog(); eventlog.set_Source(sourceLog); eventlog.WriteEntry("Test log event viewer!"); eventlog.WriteEntry("Erro! Teste error. \n\n" + con2str(xSession::xppCallStack()), System.Diagnostics.EventLogEntryType::Error); eventlog.WriteEntry("test abc" , System.Diagnostics.EventLogEntryType::Warning); info("show event viewer!");    

Set Up an AOS Instance as a Batch Server in MSD Axapta

1. Follow the path Administration > Setup > Server config. 2. On the Overview tab, verify that the Enable Batch check box is marked. 3. Define the time that the AOS instance is available for batch processing 4. Set the Number of batch sessions to 11. 5. Set the Exclusion Start Time to 23:00. 6. Set the Exclusion End Time to 19:00. 7. Close the form.

Company Range Methods in AOT Reports in MSD Axapta

Override methods on the AOT report node to control the details of cross company behavior. For example, you can override the report's init method with the following X++ code. public void init() { super(); this .query() .allowCrossCompany( true ); this .query() .addCompanyRange( "dat" ); this .query() .addCompanyRange( "dmo" ); }

crossCompany Keyword on the X++ Select Statement in MSDAX

crossCompany Keyword on the X++ Select Statement The following code example populates a table buffer with all the BankAccountTable rows that have a dataAreaId of either cm1 or cm2. This example assumes that the user has authority to access data for these two companies. The first two dataAreaId values that are found will be printed. BankAccountTable tabBAT; // saveDataPerCompany == true. container conCompanies = [ 'cm1', 'cm2' ]; str sCompanyPrevious =" "; int iCountCompanies = 0; ; while select crossCompany : conCompanies * from tabBAT order by dataAreaId { if ( sCompanyPrevious != tabBAT .dataAreaId ) { print( tabBAT .dataAreaId + " = tabBAT .dataAreaId" ); iCountCompanies++; if ( iCountCompanies >= 2 ) { break; } sCompanyPrevious = tabBAT .dataAreaId; } } pause; return;

Assign Users to Profiles in MSDAX

Assign Users to Profiles in AX To specify which Role Centers the users see when they open the Microsoft Dynamics AX client or Enterprise Portal, the Administrator must assign the user to a user profile. 1. Open the User profiles form 2. Highlight the Profile ID 3. Click the Add User button 4. Select the User ID from the drop-down list 5. Select All companies or Select companies 6. Click on OK After assigning users to a profile, those users must restart the Microsoft Dynamics AX client or refresh their Web browsers to view their Role Centers

How to Give Users Access to the SharePoint Site in MSDAX

How to Give Users Access to the SharePoint Site After Role Centers and Enterprise Portal installation, the administrator will give users access to the Role Centers SharePoint site. If a user does not have access to the site, the user will receive an access error when attempting to view the Role Center page on either the Microsoft Dynamics AX client or in Enterprise Portal. 1. Open the Role Centers site in a Web browser. The default URL is http://server_name/sites/DynamicsAx. 2. On the Site Settings page, under Users and Permissions, click People and groups. 3. On the toolbar, click New > Add Users or New > New Group to add users or create a new group on the current site. 4. Assign users to SharePoint groups whenever possible to help minimize the amount of time spent administering individual user accounts. 5. It is possible to add all the members of an Active Directory group by entering the domain and group name as a new user. All authenticated users may be added by clic

Install Role Centers and enterprise portal in MSD axapta

1. Insert the Microsoft Dynamics AX 2009 DVD into the drive. If the Microsoft Dynamics AX Setup Wizard does not launch automatically, double-click Setup.exe in the root directory of the DVD. If installing from a network location, share the installation files and connect to the shared location from the computer where the program will be installed. 2. On the Select maintenance mode screen, select Add or modify components and click Next. 3. Select Role Centers and Enterprise Portal, and then click Next. 4. Complete the installation wizard. Please refer below website to know more .

Task Recorder in MSD axapta

Task Recorder in axapta steps to record and document a process in Microsoft Dynamics AX 2009: 1. Open Task Recorder 2. Start recording. 3. Go through the sequence of actions in Microsoft Dynamics AX that are to be recorded. For example, this may be how Microsoft Dynamics AX is used to handle the sales order process, from the initial creation of the sales order and until the order has been invoiced. 4. Stop recording and save the recorded actions. 5. Generate a document, presentation, or process diagram based on the recording.

Link a Financial Dimension to a Site in MSD Axapta

Link a Financial Dimension to a Site The following procedure shows how to link financial dimensions to inventory transactions associated with specific production sites. 1. Click Inventory management > Setup > Posting > Dimension link. 2. In the Dimensions field, select which financial dimension to link to the site inventory dimension. (The Department dimension shows by default, but it can be changed.) 3. Click the Sites button to open the Sites form. The financial dimension selected in the previous step now appears as a column header on the Overview tab. 4. Select a site. In the Dimensions column, select a financial dimension from the look-up list. (The list displays the dimensions that are set up in the Dimensions form, which is located at Basic > Dimensions.)

Add Miscellaneous Charges to a Purchase Order in MSD Axapta

Add Miscellaneous Charges to a Purchase Order To add miscellaneous charges to a purchase order, follow these steps: 1. Click Accounts payable > Purchase Order Details. 2. Select a purchase order and then click Posting > Invoice. 3. Enter or select an invoice. 4. Select which miscellaneous charges transactions to add, change, or delete: a. To add, change, or delete miscellaneous charges transactions for the invoice header, click Setup > Misc. charges on the Overview tab. b. To add, change, or delete miscellaneous charges transactions for an invoice line, click the Lines tab, and then click Misc. charges. c. To add, change, or delete miscellaneous charges for the invoice header for a summary invoice that is selected on the Overview tab, click the Purchases tab, and then click Setup > Misc. charges. 5. In the Misc. charges transactions form, enter the miscellaneous charge from the invoice that you received from your vendor. 6. If necessary, you can click

Steps to Set Up Purchase Requisition Parameters in MSD Axapta

Steps to Set Up Purchase Requisition Parameters 1. Click Accounts payable > Setup > Parameters. 2. Click the Purchase requisition tab to specify the parameters for purchase requisitions. 3. In the Purchase requisition catalog field, select which items to make available in purchase requisitions. • Catalog - Applies items that have been filtered for use in purchase requisition • All items - Applies all items • Non stopped items - Applies items that are not blocked for purchase. 4. If you selected Catalog in the Purchase requisition catalog field, select the product catalog to apply to purchase requisitions in the Product group field. 5. In the Category node, select a category catalog to apply category items to purchase requisitions. 6. Select the Lock multiples, Lock max. order quantity, or Lock min. order quantity to prevent requisitioners from overwriting quantities in purchase requisitions that have been set up for the item. Item quantities are defined in In

procedure to perform an acquisition reversal in MSD Axapta

Steps to Set Up Purchase Requisition Parameters 1. Click Accounts payable > Setup > Parameters. 2. Click the Purchase requisition tab to specify the parameters for purchase requisitions. 3. In the Purchase requisition catalog field, select which items to make available in purchase requisitions. • Catalog - Applies items that have been filtered for use in purchase requisition • All items - Applies all items • Non stopped items - Applies items that are not blocked for purchase. 4. If you selected Catalog in the Purchase requisition catalog field, select the product catalog to apply to purchase requisitions in the Product group field. 5. In the Category node, select a category catalog to apply category items to purchase requisitions. 6. Select the Lock multiples, Lock max. order quantity, or Lock min. order quantity to prevent requisitions from overwriting quantities in purchase requisitions that have been set up for the item. Item quantities are defined in Inven

Steps to Associate a Fixed Asset with a Project in MSD Axapta

Follow this procedure to associate a fixed asset record with a project: 1. Click Project > Projects. 2. Move to the project or subproject desired. 3. Click the Setup tab. 4. Click the Fixed asset field. 5. Select the desired fixed asset from the drop-down list of assets. 6. If you are in a parent project record and sub projects exist for the parent project, a Change of General Project Information form will open, asking which of the projects in the hierarchy you want to change. Select one of the following values: • Only current project • Edit only subprojects with the same value • Edit all subprojects 7. Save the record. The asset is now associated with the project and its subprojects.

Steps to Set and modify Capitalization Threshold in MSD axapta

Steps to Set a Capitalization Threshold Follow this procedure to establish a Capitalization Threshold: 1. Click General Ledger > Setup > Parameters. 2. Click the Fixed Assets tab. 3. In the Depreciation field group, click the Consider capitalization threshold on. 4. In the Capitalization threshold field, enter the Capitalization threshold value. Steps to Modify the Capitalization Threshold Follow this procedure to modify the Capitalization threshold for an asset group: 1. Create the fixed asset group, or open an existing asset group for modification (General Ledger > Setup > Fixed assets > Fixed asset groups) 2. Click the General tab. 3. In the Capitalization field group, enter the desired value in the asset group's Capitalization threshold field.

steps to create an Asset condition in MSD axapta

steps to create an Asset condition Asset conditions can be assigned to Fixed assets and define the state of the asset, such as good, excellent, new, used, or refurbished. Only Asset conditions that are not assigned to a fixed asset can be deleted. Follow these steps to create an Asset condition: 1. Click General ledger > Setup >Asset conditions. 2. Press CTRL+N. 3. Enter a unique identifier in the Asset condition field. 4. In the Description field, enter a short description of the condition.

Find label in MSD axapta application

Find label in microsoft axapta application This form is used to search the label system. This is the same form opened when looking up a label from the property sheet or from the code editor. The search for labels will be done in the language selected at the top. If you want to search for a label in English, you can have the label shown in other languages by going to the advance tab page and select the desired languages. You search will still be done in English, but as an addition the selected languages will be listed in the bottom of the form.  This can be useful if you want to assure that labels have been added for all the languages you use for formulas like the sales invoice. When searching for a label using < and > will narrow your search. If you want to look up the label 'Customer', it will perform faster by keying in <Customer> as only labels with the exact text 'Customer' will be found. To find all labels starting with 'Customer', you sim

Label files in MSD axapta application

Label files in axapta application Label files *.ALD A text file containing all labels for the label file id. *.ALC Comments added in the label system are stored in this file. *.ALI Index file for the label file id. If this file is missing, the file will automatically be created first time the label system is accessed.

Executing form menu item through code in MSD axapta

new menuFunction(menuItemDisplayStr(CustTable), MenuItemType::Display).run(); Here the form CustTable is called using the display menu item CustTable. The form will only be loaded if the user has been granted permissions to the CustTable form. The method run() executing the menu item has the class Args as parameter. For example you can use Args to pass a parameter to the called object for filtering data.

System Classes Ranges using MSD axapta

System Classes Ranges using MS axapta SysQuery query; SysQueryRun queryRun; QueryBuildDataSource custInvoiceJourDS; QueryBuildRange rangeInvoiceAccount, rangeInvoiceDate, rangeDimensionDepartment; ; query = new Query(); custInvoiceJourDS = query.addDataSource(tablenum(CustInvoiceJour)); rangeInvoiceAccount = custInvoiceJourDS.addRange(fieldnum(CustInvoiceJour, InvoiceAccount)); rangeInvoiceAccount.value(queryValue("5000")); rangeInvoiceDate = custInvoiceJourDS.addRange(fieldnum(CustInvoiceJour, InvoiceDate)); rangeInvoiceDate.value(queryRange(datenull(), systemdateget())); rangeDimensionDepartment = custInvoiceJourDS.addRange(fieldId2Ext( fieldnum(CustInvoiceJour, Dimension), 1)); rangeDimensionDepartment.value(queryValue("Sales")); queryRun = new SysQueryRun(query); queryRun.prompt();

Advance ranges example in MSD axapta

Advance ranges example in axapta SysQuery query; SysQueryRun queryRun; QueryBuildDataSource custInvoiceJourDS, custInvoiceTransDS; ; query = new Query(); custInvoiceJourDS = query.addDataSource(tablenum(CustInvoiceJour)); custInvoiceJourDS.addRange(fieldnum(CustInvoiceJour, InvoiceAccount)); custInvoiceJourDS.addRange(fieldnum(CustInvoiceJour, CurrencyCode)); custInvoiceTransDS = custInvoiceJourDS.addDataSource(tablenum(CustInvoiceTrans)); custInvoiceTransDS.addRange(fieldnum(CustInvoiceTrans, ItemId)); custInvoiceTransDS.relations(true); queryRun = new SysQueryRun(query); queryRun.prompt();

example of queryrun in MSD axapta

example of queryrun in axapta SysQueryRun queryRun = new SysQueryRun(querystr(MyQuery)); CustInvoiceJour custInvoiceJour; CustInvoiceTrans custInvoiceTrans; ; if (queryRun.prompt()) { while (queryRun.next()) { custInvoiceJour = queryRun.get(tableNum(CustInvoiceJour)); custInvoiceTrans = queryRun.get(tableNum(CustInvoiceTrans)); if (queryRun.changed(tableNum(CustInvoiceJour))) { info(strfmt("Account: %1", custInvoiceJour.invoiceAccount)); } if (queryRun.changed(tableNum(CustInvoiceTrans))) { info(strfmt("Item: %1, Qty: %2, ",custInvoiceTrans.itemId, custInvoiceTrans.qty)); } } }

Print using Microsoft Word in MSD axapta

Print using Microsoft Word in axapta void run() { COM COMAppl, COMDocuments, COMDocument; ; COMAppl = new COM('Word.Application'); COMDocuments = COMAppl.documents(); // enter path to the template Reports_wordtemplate.dot COMDocument = COMdocuments.add('d:\\Reports_WordTemplate.dot'); if (COMDocument) { this.setLabels(COMDocument); this.sendInventTable(COMDocument); this.showDocument(COMAppl); } }

Code to show Dynamic Reports in MSD axapta

Code to show Dynamic Reports Write following code on init method of report in axapta ReportSection reportSection; DictTable dictTable; DictField dictField; Counter fieldCounter; super(); reportSection = element.design().autoDesignSpecs().addSection(ReportBlockType::Body); reportSection.table(tableNum(custTable)); dictTable = new DictTable(tableNum(custTable)); while (fieldCounter < 10) { fieldCounter++; dictField = new DictField(dictTable.id(), dictTable.fieldCnt2Id(fieldCounter)); reportSection.addControl(dictTable.id(), dictTable.fieldCnt2Id(fieldCounter)); }

Send and run method in MSD axapta

Run Run() is called when the OK button is pressed in the dialog. Run() performs the following steps: If no generated design exists, a design is created on the fly based on the auto design. Call fetch() Call print() The method can be used for addingranges to the query after the Based On settings in the dialog Send Send() is related to fetch(). Fetch() iterates through the query records, and send() sends the records to the design. The method can be overridden to validate whether or not the record should be printed.

Pack and execute section in MSD Axapta

Pack and unpack This method is used for storing last values. It is used in conjunction with unpack(), which loads the last value stored. However unpack() is not a base method. If a new dialog field has been added, pack() is overridden to store the values from the dialog. Execute section Each section in the design has the executeSection method, which is used to print the section. The method can be used to validate whether or not the section must be printed

Definition of Fetch method in MSD axapta

Definition of Fetch method in axapta This method is the engine of the report. Fetch() opens the user dialog, selects the records from the database by processing the query and sending the records to be printed. This method is generally overridden,when an expression cannot be specified in a query.

show data source information using MSD axapta

show data source information using axapta FormDatasource formDatasource; FormGroupControl formGroupControl; FormStaticTextControl formStaticTextControl; Counter counter; Counter noOfDatasources; ; noOfDatasources = this.form().dataSourceCount(); if (noOfDatasources) { formGroupControl = this.form().design().addControl(FormControlType::Group, "formGroupControl"); formGroupControl.caption("Tables used by form"); formGroupControl.frameType(3); } for (counter=1; counter <= noOfDatasources; counter++) { formStaticTextControl = formGroupControl.addControl(FormControlType::StaticText, "formStaticTextControl" + int2str(counter)); formStaticTextControl.text(tableid2name(this.form().dataSource(counter).table())); }

How to show only open order of sales in MSD axapta

How to show only open order of sales in axapta FormCheckBoxControl checkBoxControl = this.controlCallingMethod(); QueryBuildRange rangeSalesStatus; Boolean ret; ; ret = checkBoxControl.modified(); rangeSalesStatus = SalesTable_ds.query().dataSourceTable(tablenum(SalesTable)).findRange(fieldnum(SalesTable, salesStatus)); if (!rangeSalesStatus) { rangeSalesStatus = SalesTable_ds.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, salesStatus)); } if (checkBoxControl.value() == NoYes::Yes) { rangeSalesStatus.enabled(true); rangeSalesStatus.value(queryValue(SalesStatus::Backorder)); } else { rangeSalesStatus.enabled(false); } SalesTable_ds.executeQuery();

Calling user Method in MSD Axapta

Calling user Method in Axapta static void Forms_CallingUserMethod(Args _args) { Args args; Object formRun; ; args = new Args(); formRun = new menuFunction(menuItemDisplayStr(MyForm_CallingUserMethod), MenuItemType::Display).create(args); formRun.init(); formRun.setReadOnly(); formRun.run(); }

Use of Data Source Methods in MSD axapta

Use of Data Source Methods in axapta Adding a new record from a form will call the following sequence of data source methods: create() ► initValue() ► refresh() ► active() ► refresh() 1. The method create() is called when pressing ctrl+n to add a new record. 2. The data source initValue() is called by create(). You should initialize fields which must have a specific value in initValue(). The table method initValue() is called by super() in the data source initValue(). If the initialized values are not form specific, you should use the corresponding table method. 3. After initialization refresh() is called, and when entering a record active() is called. Refresh is called again by active(). When saving a record the following methods are called: validateWrite() ► write() ► refresh() 1. ValidateWrite() will call the table method validateWrite(). Again, always use the corresponding table methods if possible. 2. The data source method write() will call either insert() or update

Common Form Methods in MSD Axapta

Common Form Methods in Axapta Only few of the form methods are needed in daily use. Having a basic knowledge of the execution order of these methods will help you a lot when starting making your modifications. The following methods are executed in the listed order when a form is opened and closed: init() ► ds init() ► run() ► ds executeQuery() ► canClose() ► close() 1. FormRun.init() is the first method called. The super() call in FormRun.init() will call FormDataSource.init() for each data source used in the form query. 2. The super() call in FormRun.run() will call FormDataSource.executeQuery() for every data sources. 3. When closing the form FormRun.canClose() will validate whether the form may be closed, and if true FormRun.close() is called. These are the most important methods executed when a form is opened and closed. Other methods are executed in the opening and closing sequences such as loading application user settings. However normally you will only need to override

Bitwise operators in MSD axapta

Bitwise operators in axapta Bitwise operators are, as the name indicates, used to evaluate expression by using arithmetic and conditional operators at the bit level. These bitwise operators can only be used with integer values. A common situation for using bitwise operators is as an alternative to having a set of variables setting true or false values if you have to control some access controls with several levels. However the use of bitwise operators will make your code more difficult to read. This might be the reason that these operators are not commonly used in the standard application. In fact, the only place you may find yourself using the bitwise operators is when you are interfacing with external applications such as interacting directly with Windows API or need to do any low-level operations on the database. To be able to understand the result of an expression using bitwise operators, you will have to translate the integer values to binary numbers. 13 & 10 // 1101