can somebody help me disable a column… for example user1 and user2, they can access both form but user2 can not edit the value of one column… i’m using nav5 pls pls pls
did you try Editble property? its one way of disabling the column. if you want to edit then the option must be “yes” in the editable, otherwise “no”.
Yes its possible place the bloe code at OnOpenForm() Trigger
IF USERID <> ‘Marshal’ THEN
CurrForm.“No.”.EDITABLE(FALSE);
Thanks
Jerome Marshal.j
hi marshal,
but why do we have to do it the complex way? cant we just activate/disable the “editable property”?
Hi Shona
If you chage ‘Editable’ property of a field or a controle it become Non Editable/Editable permanently.But victor’s requirment is user 1 can edit but not user 2.so you cannot chan the peoperty directly .you have to handle it by coding.
Thanks
Marshal,J
thanks marshal…
have another problem about the accept action message column, it always automatically put a tick mark on the line… do you know why it is automatic?
This is one of the way, but instead of Hard-coding the user ID, better you use some a new field (in user setup table) and then write code.
are you speaking about the tick mark in the object designer? then it is done so automatically by the system to indicate that this field has been modified!
oh correct. didnt think about that factor:)
I Can guess some what your code should be like this
Dialog.CONFIRM(Question, TRUE); it ill set the default value as ture means chech box will be chacked
Dialog.CONFIRM(Question, False); it will set the default value as false.can you show us your code
THanks
Jerome Marshal.j
No Problem Shona.
Yes as dhanraj said don’t hard code use user set up
this is what i’m trying to do… i want to disable the accept action message column in the requisition worksheet form. only user1can put a tick mark on the said column and user2 can only view not edit the column… can this work?
thanks,
can’t disable any column…T_T
Hi Victor
Follow the below steps before that lets have users Mashal and Victor
victor can edit Marshal cannot edit the Accept Message Column
1.Now Place the below code at Form - OnActivateForm() trigger of form Req. Worksheet
if USERID = ‘Marshal’ then
CurrForm.“Action Message”.EDITABLE(False)
else
CurrForm.“Action Message”.EDITABLE(True);
CurrForm.UPDATE;
Thanks
Jerome Marshal.J
Alos place the below code at OnInsert() Trugger of Requisition Line table
IF USERID=‘Marshal’ THEN
BEGIN
“Accept Action Message”:= FALSE;
MODIFY;
END;
Thanks
Jerome Marshal
ok then what to do next?
thanx
Victor i explain the code
OnInsert() of Requisition Line table
IF USERID=‘Marshal’ THEN
BEGIN
“Accept Action Message”:= FALSE;
MODIFY;
END;
The above code will set “Accept Action Message” unchecked for the user Marshal
OnActivateForm() trigger of form Req. Worksheet
if USERID = ‘Marshal’ then
CurrForm.“Action Message”.EDITABLE(False)
else
CurrForm.“Action Message”.EDITABLE(True);
CurrForm.UPDATE;
This will make the field “Action Message” non editable for the user Marshal
Thats All nothing else you need to do
Thanks
Jerome Marshal.j
can’t find OnInsert() of Requisition Line table?
OnInsert() is it same with OnInsertRecord()?
OnInsert() is a trigger of Requisition Line table Go to design mode of Requisition Line table
press F9 then press Ctrl+Home ther you can find the OnInsert() trigger
Thanks
jerome Marshal.J