Hi all,
I have extended my Purchase Header table and Page to include Job No. and Job Description fields and what I need is when I pick the Job No on the Purchase Header page, my custom fields on Job page should be updated the vendor no and Vendor name from the Purchase order. I have put all my code inside OnValidate trigger but immediately I pick the job no and description on my Purchase Order page and save, my job card window fields are not updated. Below is the extract of my code.
You are saying Jobheader.findlast and are you sure that in the last record you have a valid ProjNo, if not it will find a blank last record and will not update any values also even if you find you need the code Jobheader.MODIFY which is missing in your code.
Thanks so much for your response. Yeah I have missed Jobheader.MODIFY. Should I used find last or Find first.
Kindly advice.
You should use findfirst which will give you a valid match.