Skip to main content
Dynamics 365 Community / Forums / Finance forum / X++ code to control Pl...
Suggested answer

X++ code to control Plafond of the Intent Letters tax

editSubscribe (0) ShareShare
Posted on by 67
I need to implement the procedure for posting vendor invoices (both from purchase order and journal) by inserting a pop-up that is enabled when the amount to be deducted from the letter of intent relating to the document being posted is greater than the remaining amount of the letter. 
The pop-up should show the following message: 
/Amount to be deducted from the balance of the letter of intent greater than the remaining amount. Shall we continue?/ 
The pop-up should have two buttons: 
Ok: If used, the system will have to account for the invoice despite the overhang. 
Cancel: If used, the system will cancel the posting. 
I'm new with dynamics, I'm really struggling to find examples and documentation on the internet and I'm stuck in this task. I tried to do an event handler, checking if the remaining amount in the intent letter table is less than 0, but I'm sure my code is not correct. Does anyone has any hint for me? Thank you