Home » Developer & Programmer » Forms » GO_BLOCK after insertion (Forms 6i)
icon4.gif  GO_BLOCK after insertion [message #488532] Sat, 08 January 2011 22:02 Go to next message
ahmer_najam
Messages: 4
Registered: January 2011
Location: Jeddah
Junior Member
Dear All,

I want to use GO_BLOCK('TM_POLICY') after insertion, while i have written code on ON_INSERT trigger. But I could not switch block.

Please help me in regards, thanks in advance.
Re: GO_BLOCK after insertion [message #488534 is a reply to message #488532] Sun, 09 January 2011 00:12 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,

Please try this.

Go_Block('Block_Name.Item_Name');


Regards,
Irfan
icon7.gif  Re: GO_BLOCK after insertion [message #488564 is a reply to message #488534] Sun, 09 January 2011 07:21 Go to previous messageGo to next message
ahmer_najam
Messages: 4
Registered: January 2011
Location: Jeddah
Junior Member
Sir,

First of all thanks for the reply. Secondly my problem has not been resolved yet.

Let me clarify the problem.

I have written INSERT statement on ON_INSERT trigger of block, and I want to switch first item of the block after data insertion but compiler is prompting error of illegal statement when i put GO_BLOCK statement in this trigger.

Kindly advice in this regards.

Thanks.
Re: GO_BLOCK after insertion [message #488565 is a reply to message #488564] Sun, 09 January 2011 07:42 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Please explain more.Do you have Master-Detail form.?If yes then why don't use data block navigation.
Re: GO_BLOCK after insertion [message #488593 is a reply to message #488565] Mon, 10 January 2011 01:14 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
GO_BLOCK is a restricted procedure; thus, it can not be used in ON-INSERT trigger. I suppose that you should explain how exactly you perform "insert" (is it by pressing a button? If so, you could - as the last line of the WHEN-BUTTON-PRESSED trigger - perform GO_BLOCK. If not, what is it, then?).

As of Irfan's suggestion in the first reply, well - that's GO_ITEM's syntax, not GO_BLOCK.
Re: GO_BLOCK after insertion [message #488599 is a reply to message #488593] Mon, 10 January 2011 02:57 Go to previous messageGo to next message
ahmer_najam
Messages: 4
Registered: January 2011
Location: Jeddah
Junior Member
Look I have putted INSERT STATEMENT on ON_INSERT trigger and what I want once record saved then cursor should move to first item of the screen. So do you have any idea how could I perform this task.

I really appreciate for your help.

Thanks
Re: GO_BLOCK after insertion [message #488606 is a reply to message #488599] Mon, 10 January 2011 03:35 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If I may ask, why do you use ON-INSERT trigger? What is a block based on? Is it a non-database block (if so, why)?

Once a record is insert into a database, you have to perform COMMIT in order to permanently save it. So, GO_ITEM in a KEY-COMMIT trigger might do the job.
Re: GO_BLOCK after insertion [message #488646 is a reply to message #488606] Mon, 10 January 2011 06:00 Go to previous message
ahmer_najam
Messages: 4
Registered: January 2011
Location: Jeddah
Junior Member
Thanks a lot dear it is working on form level. I really appreciate your support.

Previous Topic: 11g toolbar
Next Topic: web.show_document parameter passing to Report9i
Goto Forum:
  


Current Time: Fri Sep 20 02:34:37 CDT 2024