If u r putting validation on the storing of data in table, u can put on validateWrite() method.
And if u want to put validation for the posting business logic, u can create method for that, like check in ProjFormLetter_Invoice class and can call that method in updateNow().
Check ProjFormLetter_Invoice class, we have some check<> method for reference.
I just want to display a info message, Means i am not going to stop the data storage in table and i am not changing the business logic also,
My code is like this
CustTrans custTrans;
date duedate;
SysDate SysDate;
select projProposalJour
where projProposalJour.ProposalId == ProjProposalJour.ProposalId;
while select custTrans
where custTrans.AccountNum == ProjProposalJour.OrderAccount
&& custTrans.Voucher == ProjProposalJour.LedgerVoucher
{
duedate = custTrans.DueDate;
}
if(duedate < SysDate)
{
info(“due date exceeded”);
}
Based on the condition in the if loop i want to display the info message. this code i tried in validatewrite method of Projinvoiceproposal form. but its not working.because that form is not editable to the user.