I’m learning X++ and i have 2 question:
I don’t understand what is the utility of ttsbegin and ttscommit !
where i must use it and what’s the utility?
X++ Standards: ttsBegin and ttsCommit AX 2012
What is the utility of this operator “~”?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the documentation:
Note that
This means that you would begin a transaction with
ttsBeginand end it withttsCommit(if successful) or throw an exception (if the transaction is unsuccessful). It is unclear from the documentation, but transactions mean manipulation of application tables.You would use them when you want to ensure that your read or update operations on application tables are not made inconsistent by other table operations that happen simultaneously
See examples at the same link.
The
~operator is bitwise not, that flips each bit in an integer number. For example, (assuming 32 bit integer):~0isFFFFFFFF(each bit is now 1),~4isFFFFFFFB(hexadecimal representation).