Insert_Record Built-In


I'm trying to attach a trigger to a button, so that every time the button is pressed, insert_record built in should be executed and it should have the same function as that of the default menu option.
  The form builder error says that insert_record built-in can only be used with the On_Insert trigger but in case of the button there is no On_insert trigger option. Is there any other way I can accomplish this.

Thanks

regards

Hassan
hayubAsked:
Who is Participating?
 
kretzschmarConnect With a Mentor Commented:
well, hassan,

then you should do it :-)
(maybe its easier when i post this as answer)

meikl ;-)

0
 
vanmeerendonkCommented:
code in your when-button-pressed :
EXECUTE_TRIGGER('ON-INSERT');

and code a ON-INSERT trigger on module-level.
Here you kan use the insert_record;

0
 
schwertnerCommented:
Forms Builder automatically creates INSERT, UPDATE, DELETE statements when you insert, update or mark for delete records in the blocks of your form.

So the only you need is to activate the implicit DML statements using the EXIT_FORM, CLOSE_FORM built-ins in the WHEN-BUTTON-PRESSED trigger.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
schwertnerCommented:
If you need to make additional inserts (excluding the automatcal) you can use the POST_INSERT, POST_UPDATE, POST_DELETE and even POST_QUERY trigger on block or above level.
0
 
kretzschmarCommented:
use
create_record
instead of
insert_record
in your when-button-pressed trigger

meikl ;-)
0
 
hayubAuthor Commented:
Thanks a lot guys... I tried kretzdchmar option and it works perfectly fine....



thanks again


Hassan
0
 
hayubAuthor Commented:
Thanks a lot guys... I tried kretzdchmar option and it works perfectly fine....



thanks again


Hassan
0
 
hayubAuthor Commented:
Thanks a lot guys... I tried kretzdchmar option and it works perfectly fine....



thanks again


Hassan
0
 
hayubAuthor Commented:
Thanks a lot guys... I tried kretzdchmar option and it works perfectly fine....



thanks again


Hassan
0
 
hayubAuthor Commented:
Thanks a lot guys... I tried kretzdchmar option and it works perfectly fine....



thanks again


Hassan
0
 
kretzschmarCommented:
well,

then you should reject vanmeerendonk's answer
and grade me

glad to helped you

meikl ;-)
0
 
hayubAuthor Commented:
I accept kretzschmar answer and give him the rating A.



thanks again



Hassan
0
All Courses

From novice to tech pro — start learning today.