cmandal
11th April 2003, 20:50
is it possible to suppress the text dialog box when a user clicks on the text button and if no text is present via code.

If no TEXT is present it should open TEXT editor directly.

NPRao
11th April 2003, 21:17
Sekhar,

The trick is to assign a default value for text maybe just "." character when a record is saved. We used it in before.save.object() in the DAL for the table.


if zmmig100.note = 0 then
return(put.def.mig.text())
endif


Please complete your user profile with regards to the Baan software version, Database software and OS version. This will help other members when diagnosing your problem.

cmandal
14th April 2003, 19:36
Prashanth

Thanks for the info and sorry for leaving the profile empty. I have changed the profile.

We are on Baan IV yet so is there anything that can be done in this version or will this work.

I will search for this function in the tools dict.

I got the concept and works well. Thanks.

NPRao
14th April 2003, 20:04
Shekar,

Refer to the online help - before.save.object() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_dal_before_save_object)

The equivalents for the before.save.object() would be to use the before (re)-write sections for the main table in BaaN-4 series.

This object hook replaces the before.write andbefore.rewrite subsections of the main.table.io event section in a UI script. If there is a DAL for an object set, this hook is called to perform the necessary checks. Any before.write and before.rewrite sections in the UI script are ignored. So, if a UI script contains before.write and before.rewrite sections for the main table, you must replace these by before.save.object() hooks in the DAL.


And then you can use the text functions like - text.defaults() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_text_fields_text_defaults), text.write() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_text_fields_text_write) to put some default text for that text field.