Skip to main content

Posts

Concept of exception handling in X++ programming MSDAX

Main idea behind exception handling in X++ programming The main idea behind exception handling is to plan for potential pitfalls within the program. These exceptions are inevitable and if the code can expect some of these issues and have contingency plans for the code, the flow of the program is more efficient. The try statement defines a block of code that is included in the try-catch statement. It is used as the point to which the logical program flow will return should it encounter a retry command. The throw statement automatically initiates a ttsAbort statement every time that it is called. The throw statement will force the current transaction to roll back to its original state before the ttsBegin statement.

Transaction Tracking System and what is their significance in MSD axapta

ttsBegin : You mark the beginning of the transaction with ttsbegin. ttsCommit : You mark the successful end of a transaction with a ttscommit.This ensures the transaction is performed the way it is supposed to upon completion. ttsAbort : This can be used as an exception to make a transaction be aborted and rolled back to its state before the ttsbegin. You insert a ttsAbort wherever you want this to occur.

Main difference between using a while do-while statement in MSD Axapta

Main difference between using a while statement and a do-while statement The main difference between a While statement and a Do...While statements that the condition is evaluated after the statements are executed in a Do...While statement. Therefore a Do...While statement always runs at least one time even if Condition does not match inside while condition in loop. while(Condition) { statement. } Sample code for Do-while statement.. Do { statement. }While(Condition) Sample code for while statement..

Primary types of conditional statements in MSDAX X++

 If Statement: This statement checks whether a condition is true or false.If the statement is true, all the code in the braces '{}' is executed. There are other versions of the If statement including an If…else, or a nested If statement. Switch Statement: This is a multi-branch control statement that defines a condition and whose result determines the code that is executed. A switch statement has multiple cases and for each case there are listed statements that will be executed if that case satisfies the condition. Ternary Operator: This control structure acts as an If…else statement. It is primarily used because it is much more convenient to code than writing out an If…else statement

Three main Object-Oriented Programming components in MSD Axapta

There are Three main Object-Oriented Programming components in Axapta 1.Classes are blueprints that describe the objects derived from them. A class is a model classification of the methods and variables in a specific type of object. 2.Objects are instances of classes. Each instance has data members andlogic (methods) defined in the class. 3.Methods are functions (subroutines)associated with a class or an object. An object implements its behavior with methods.

code to force the database synchronize in axapta

 If the DataBase synchronize failed somewhere, below is a link to get code to force the database synchronize in axapta by job. code to force the database synchronize