bombram
25th August 2014, 15:45
Good day everybody :-)
Who could help on the following questions:
1. Is it possible to get access to the form field, using UE. And if it can ba done, how to do it.
2. How to block (disable) the field on the form through UE.
Thank you.
bhushanchanda
25th August 2014, 16:22
Hi,
1. Yes, it can be accessed in UE on its execution. You can retrieve the value using the field name itself. I guess you need to declare it extern.
2. No, UE is too late for disabling the fields. If its a standard session, you can use session wrappers or table data authorization.
bombram
26th August 2014, 13:24
Bhushan, thank you for your reply :-)
bombram
26th August 2014, 13:34
Bhushan one more question, I am sure you know the answer :-) the field disabling was changed, now it is necessary only not to save record into table. I tried to use abort.transaction () in USER EXIT, but on the forum I found info that such functions can not be used in User Exits. What method it is better to use to cancel the updating of the table?
bhushanchanda
26th August 2014, 15:36
Hi,
You can do like this:-
if error_condition_met then
err.msg = "Error_message"
dal.set.error.message ("tigenstring",err.msg)
return(DALHOOKERROR)
endif
You need to include #include<bic_dam> in your script.
BaanInOhio
26th August 2014, 19:13
You can disable fields through the UI as well. Go to the session with a user that doesn't have session personalization already defined. Personalize the field(s) in UI, including making fields read-only. Go to session personalization in LN. Find session and user, select lines, copy to a different level. You can copy the personalizations to a role or a company level. Once copies, all users with role or company will have the field blocked without any LN changes. You can also hide fields and change position on the form or list.
bombram
27th August 2014, 14:08
Thank you very much for your advices, they were helpful :-)
One thing about return(DALHOOKERROR) - in some sessions (and in my case) using return(DALHOOKERROR) caused session blocking, to avoid it I used return(0).
benito
27th August 2014, 15:01
they are total opposites: 0 = success, DALHOOKERROR = failure. i suggest you look at your validation carefully. in case of failure you can have the following:
abort.transaction()
return(DALHOOKERROR)
show.dal.messages(MSG.ERROR)
Thank you very much for your advices, they were helpful :-)
One thing about return(DALHOOKERROR) - in some sessions (and in my case) using return(DALHOOKERROR) caused session blocking, to avoid it I used return(0).