Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2076
  • Last Modified:

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
0
hayub
Asked:
hayub
  • 6
  • 3
  • 2
  • +1
1 Solution
 
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
 
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
kretzschmarCommented:
well, hassan,

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

meikl ;-)

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 6
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now