Notifications
Announcements
No record found.
Hello,
I needs help, I am adding up a logic updating a record in the purchTable when I click confirm after the operation is complete it cannot proceed when I use my extension class. Can anyone explain or how is it possible to add a logic once the PO is confirmed? Thank you.
Hi,
If you are getting the error as you mentioned in subject in that case you need to write your logic between ttsbegin and ttscommit.
Hello SII1MNL,
As per your subject, if that's the error that you are facing then ttsbegin and ttscommit is what you need to write your code in.
A few questions:1. The field that you are trying to update is it a custom field?2. Which operation are you referring to? Is it that PO after confirmation needs to update details in the PurchTable?3. Once you click the confirm button, your PO needs to be updated?
If the answer to the third question is yes, then write an event handler on the click event of the Confirm button inside the extension class.
Thanks,Navneeth Nagrajan | Dynamics 365 Technical Consultant
Hi SII1MNL,
As Puneet said, you should put ttsBegin and ttsCommit.
Add ttsbegin before query statement,and add ttscommit after the operation
Just like the following codes:
static void dodelete(Args _args) { InventParameters invent; ttsBegin; select forUpdate invent; invent.doDelete(); ttsCommit; info("Done...."); }
Hope this helps.
yes a custom field, nothing mandatory, just getting the Description on PO Line 1st line. if it is blank the it will do nothing if there is , then it will get the description to custom field right after it is confirmed.
yes it is number 2. after confirmed
give us more insight as to where the extension code is being written ?
are you using CoC or something else?
Hi partner,
I don't think adding an event handler on the click event of the Confirm button is a good choice, if the confirmation didn't come in from the button click, it will doesn't work.
Add post event handlers on the update method of PurchTable,or you can copy the vaild method on PurchFormLetter class
Please refer to the following article about adding event before confirmation.
http://asharpx.blogspot.com/2018/01/how-to-check-custom-validation-on.html
Thank you I forgot to add ttsbegin and ttscommit , now it is working.
Will ,
Overlayering is not allowed since 8.0 so it is not recommended.
salesConfirmJourCreate class is used during posting confirmation which creates record in CustConfirmJour and CustConfirmTrans. You should look at this class instead and do COC on appropriate method which does posting.
Hi Sukrut,
Thank you for guidance.
I'm sorry that my description is not precise.
I mean copy event handlers on PurchFormLetter, please take a look at my link.
Please mark the post as answer if your query is solved.
Thanks!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 592 Most Valuable Professional
André Arnaud de Cal... 478 Super User 2025 Season 2
BillurSamdancioglu 305 Most Valuable Professional