Home » Developer & Programmer » Forms » clear a record in master block & detail block (form builder 6i)
icon9.gif  clear a record in master block & detail block [message #355152] Wed, 22 October 2008 22:53 Go to next message
fadhzone
Messages: 61
Registered: April 2008
Member
hi All...

i'm facing a problem right now.
i have 2 block (master & detail block).
I wrote a script that allow user deletes a record in detail block, but now i want to let user delete record in master block but at the same time it will delete the details.
how can i do that...

thanks. Embarassed
Re: clear a record in master block & detail block [message #355172 is a reply to message #355152] Thu, 23 October 2008 00:31 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why did you write a script? Forms enables you to delete records without any scripts; simply "remove record" by using the toolbar icon.

The same goes for both master and detail records - no script needed. Of course, you can not delete master record when detail records exist, unless you set the relation's "Delete record behavior" property to cascading. doing so, you'll remove both master and detail record(s).
Re: clear a record in master block & detail block [message #355185 is a reply to message #355172] Thu, 23 October 2008 00:56 Go to previous messageGo to next message
fadhzone
Messages: 61
Registered: April 2008
Member
yeah i know..but i don't write the script at key_crerec, when i push clear button,it will clear out all my data at the form.
Re: clear a record in master block & detail block [message #355188 is a reply to message #355152] Thu, 23 October 2008 01:03 Go to previous messageGo to next message
itech
Messages: 168
Registered: May 2008
Location: Fsd, Pakistan
Senior Member

Open your form, go to master block ==> Relations ==> Select relation and then press F4, set the delete behavior to cascade
and prevent master less operation to yes.

execute the form and check!
Re: clear a record in master block & detail block [message #355198 is a reply to message #355185] Thu, 23 October 2008 01:40 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
fadhzone wrote on Thu, 23 October 2008 07:56
yeah i know..but i don't write the script at key_crerec, when i push clear button,it will clear out all my data at the form.

Nevertheless - no script is needed to do that (if you want to CLEAR the form, which is different from DELETING records). In that case, go to Action menu and select "Clear All".
Re: clear a record in master block & detail block [message #355200 is a reply to message #355198] Thu, 23 October 2008 02:02 Go to previous message
fadhzone
Messages: 61
Registered: April 2008
Member
ok..it worked!!!

Thanks littlefoot & itech.
have a nice day!!

Previous Topic: Need jar file for Progress bar
Next Topic: Migartion 6i to 10g - HTML files
Goto Forum:
  


Current Time: Sun Dec 04 16:36:07 CST 2016

Total time taken to generate the page: 0.15928 seconds