I have a Menu Item consisteing of Offer Letter (report) and convert to employee .
Only when the offer letter is issued for that candidate ,it can be converted to employee.
How to check the condition in convert to employee whether offer letter is issued or not.
This is the code I have written for Convert to employee
IF NOT CONFIRM (‘Do you want to convert into employee’) THEN
IF “Candidate Status” = “Candidate Status”::Selected THEN
glbrecemp.SETRANGE(glbrecemp.“applicant id”,“Applicant Id”);
IF glbrecemp.ISEMPTY THEN
glbrecemp.“applicant id”:=“Applicant Id” ;
glbrecappqual.SETRANGE(glbrecappqual.“Applicant ID”,glbrecemp.“applicant id”);
IF glbrecappqual.FINDSET(FALSE,FALSE) THEN
ERROR(‘Only Selected Candidates can be converted into Employees’)
So only when the offer letter is issued this code should work ,else it shoud give an error.