validation while posting project invoice

Hi

while posting project → Project Details->Invoice->Invoice Proposal

when the user clicks the post button in projinvoiceproposal form, i want to popup a info message. The info message should come based on a validation.

Something like this

select projProposalJour
where projProposalJour.ProjInvoiceProjId == projInvoiceTable.ProjInvoiceProjId
&& projInvoiceTable.InvoiceAccount == custTrans.AccountNum
&& custTrans.TransType == LedgerTransType::Project;
duedate = custTrans.DueDate;

if(duedate > SysDate)
{
info(“due date exceeded”);
}

To achieve this where i have to write the code? can anyone out here please help me in this as i am new to AX