Home » Developer & Programmer » Forms » error in d2k form (6i)
error in d2k form [message #483451] Mon, 22 November 2010 04:42 Go to next message
rahul_dorlikar
Messages: 26
Registered: June 2010
Location: PUNE
Junior Member
Hi All,

I have problem.
my problem is that, Whenever i run the d2k form it gives an errorr. The error is " You cant create record here".

Then if i will click ok button it gives output. but first of all it gives error.. so what is the resons behind that...

So please help me....
Re: error in d2k form [message #483452 is a reply to message #483451] Mon, 22 November 2010 04:44 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
The exact error number would help.
Re: error in d2k form [message #483459 is a reply to message #483452] Mon, 22 November 2010 04:58 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps you are navigating to next record (either manually or programatically (if the latter, probably in WHEN-NEW-FORM-INSTANCE trigger)).
Re: error in d2k form [message #483486 is a reply to message #483459] Mon, 22 November 2010 07:37 Go to previous messageGo to next message
rahul_dorlikar
Messages: 26
Registered: June 2010
Location: PUNE
Junior Member
but on which level


i want this record after query.....
its line level data....


declare
cursor c1 is
select a.PID_INVNO,
b.PID_EXCISE_INVNO,
b.PID_EXCISE_INVDT
from preship_inv_dtl a, preship_inv_dtl_br b
where a.SOURCE_HEADER_ID=b.SOURCE_HEADER_ID
and a.SOURCE_LINE_ID=b.SOURCE_LINE_ID
and a.pid_ordno=:DNL_SALE_FRT_HDR.frt_ORD_NO;

Begin
OPEN c1;
FIRST_RECORD;
LOOP
FETCH c1 into :DNL_SALE_FRT_QUO_DTL.FTR_PRESHIP_INV_NO,
:DNL_SALE_FRT_QUO_DTL.TEXT_ITEM156,
:DNL_SALE_FRT_QUO_DTL.TEXT_ITEM157;
EXIT WHEN c1%NOTFOUND;
NEXT_RECORD;
END LOOP;
CLOSE c1;
FIRST_RECORD;

END;

[Updated on: Mon, 22 November 2010 07:42]

Report message to a moderator

Re: error in d2k form [message #483493 is a reply to message #483486] Mon, 22 November 2010 07:57 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Where did you put this code?

Could it be that you forgot to include GO_BLOCK('dnl_sale_frt_quo_dtl')?

Why don't you simply EXECUTE QUERY (instead of using a loop to populate a block)?
Re: error in d2k form [message #483496 is a reply to message #483493] Mon, 22 November 2010 08:10 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is the block a database block?
What is it's insert_allowed property set to?
Re: error in d2k form [message #483561 is a reply to message #483486] Mon, 22 November 2010 23:12 Go to previous messageGo to next message
rahul_dorlikar
Messages: 26
Registered: June 2010
Location: PUNE
Junior Member
when my form is in Query mode, all data comes from custom table.but there is one field which data will have to come from base table. for that what will i do
please revert back
Re: error in d2k form [message #483565 is a reply to message #483561] Tue, 23 November 2010 00:44 Go to previous messageGo to next message
rahul_dorlikar
Messages: 26
Registered: June 2010
Location: PUNE
Junior Member
i put this code in Sr_no. field of line level.. in Post_text_Item trigger


After query some data comes from base table and some data come from custom form so i cont write execute query...

[Updated on: Tue, 23 November 2010 00:49]

Report message to a moderator

Re: error in d2k form [message #483567 is a reply to message #483565] Tue, 23 November 2010 01:35 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yes, you can.

Values that don't belong to a table (data block is based on) should be - while performing QUERY - populated in POST-QUERY trigger. In INSERT mode, the same code should be put into WHEN-VALIDATE-ITEM trigger.
Previous Topic: Hierarchy tree - how to differentiate selected that highlighted to non-highted
Next Topic: How to Save a file (Pdf, Image) to the database from form 6i
Goto Forum:
  


Current Time: Thu Sep 19 17:26:28 CDT 2024