Which Trigger? [message #639892] |
Mon, 20 July 2015 04:28 |
|
sanodani
Messages: 98 Registered: October 2014
|
Member |
|
|
Hallo All...
I am trying to solve my Problem, but somehow i am bit in confusion.
My Problem is:
i have different master-Detail block. and it Display records selected in the master block, but i am trying to make some filed as not updatable or not insert or not delete, in case when one of my parameteter is not true is otherwise it can be inserted/update/delete.
and i use when-validate-item Trigger and my code:
if :Block1.text = 'EMAIL' then
set_item_property('email', insert_allowed, property_true);
set_item_property('email', update_allowed, property_true);
set_item_property('email', delete_allowed, property_true);
else
set_item_property('email', insert_allowed, property_false);
set_item_property('email', update_allowed, property_false);
set_item_property('email', delete_allowed, property_false);
emd if;
But, it does not work....
can anyone please help me on this regards?
Thankx in advance.
REgards,
|
|
|
Re: Which Trigger? [message #639893 is a reply to message #639892] |
Mon, 20 July 2015 04:32 |
cookiemonster
Messages: 13943 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
when-validate-item on which item?
You should always specify the block name as well as the item name when referring to items in code.
|
|
|
|
Re: Which Trigger? [message #639897 is a reply to message #639895] |
Mon, 20 July 2015 04:43 |
cookiemonster
Messages: 13943 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Why would you put the trigger on email?
It should be on the item used to determine if email can be changed - so block1.text.
|
|
|