hi,
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.
Please suggest.
This is the code I have written for Convert to employee
IF NOT CONFIRM (‘Do you want to convert into employee’) THEN
EXIT ;
IF “Candidate Status” = “Candidate Status”::Selected THEN
BEGIN
glbrecemp.SETRANGE(glbrecemp.“applicant id”,“Applicant Id”);
IF glbrecemp.ISEMPTY THEN
BEGIN
glbrecemp.TRANSFERFIELDS(Rec,TRUE);
glbrecemp.“No.”:=’’;
glbrecemp.“applicant id”:=“Applicant Id” ;
glbrecemp.INSERT(TRUE);
glbrecempqual.INIT;
glbrecappqual.SETRANGE(glbrecappqual.“Applicant ID”,glbrecemp.“applicant id”);
IF glbrecappqual.FINDSET(FALSE,FALSE) THEN
REPEAT
glbrecempqual.TRANSFERFIELDS(glbrecappqual,TRUE);
glbrecempqual.“Employee ID”:=’’;
glbrecempqual.“Employee ID”:=glbrecemp.“No.”;
glbrecempqual.INSERT(TRUE);
UNTIL glbrecappqual.NEXT=0;
END
ELSE
MESSAGE(‘ALREADY EXISTS’);
END
ELSE
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.
Please suggest