Page 1 of 1

no required validation windows wnen move next reco

Posted: Mon Jul 03, 2006 8:57 am
by mfa786
Hi master
Sir I have master detail block
In master block key-commit I put this code


if :ystatus ='P' then
message('Can not be update becuase this year Completely Closed');
message('Can not be update becuase this year Completely Closed');
go_item('voumaster.entdate');
elsif :ystatus ='T' or :ystatus ='N' then
commit_form;
go_item('voudetail.accid');
end if;

means if condition true then commit other wise not commit

and in detail block I put this code in key-commit event



if :ystatus ='P' then
message('Can not be update becuase this year Completely Closed');
message('Can not be update becuase this year Completely Closed');
go_item('voumaster.entdate');
elsif :ystatus ='T' or :ystatus ='N' then

IF :ITEM62=:ALLTOTAL THEN
commit_form;
go_item('voumaster.entdate');
ELSE
MESSAGE ('RECORD NOT SAVE BECUSE DEBIT AND CREDIT NOT BALANCE');
go_item('voDETAIL.CREDIT');
END IF;
end if;


sir when I change in master block then system not give me error then check condition if true then save otherwise move entdate textbox

but
when I change in detail block and press F10 then system not give me error and move entdate textbox but when I change record or go next previous record then system give me error ? do you want to save then change you have made?

Yes no cancel Button
Sir my need is system not required this message and easily go to next record only when I press f10 then show message and save my record

Please give me idea where I put my code or which event I disable

Thank
Aamir

Posted: Tue Jul 04, 2006 12:44 am
by admin
If the period is closed then even changing data should not be allowed. So better to disable update, delete of closed periods data. You can get this functionality by setting the properties of blocks. thanks