NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Rene Simons on December 25, 2011, 03:39:59 AM
-
Hi everyone,
I would like to call an update form in change mode, directly from a menu option.
At login I "preserve" the concerning recordid in a session var so it must be possible to cook up an url that does the job for me.
Anyone?
Merry x-mas
Rene Simons
-
Hallo Rene,
I recommend you to read this:
http://www.capesoft.com/docs/NetTalk6/NetTalkWebFAQ.htm#W4
also there are another method. Go in form settings, select last tab Advanced and here select Default Form Action to Change and bellow to Key field 1 Value put your ID form your primary key (example: p_web.GSV('ID_user'))
I use both methods and works perfect!
Regards,
Robert
-
Robert,
Thanks. I think this IS the answer.
Cheers,
Rene
-
Hi all,
I followed Robert's advice, and changed the URL to this:
'UpdateSEL?change_btn=change&_bidv_=' & p_web.AddBrowseValue('UpdateSEL','SEL',SEL:KeyRecordid,'<39>' & p_web.gsv('LOGIN:REL') & '<39>')
The Keyfield is a string of 16 chars. Hence the <39>'s.
This results in this link which shows up in the html code which looks like this:
<a href="UpdateSEL?change_btn=change&_bidv_=4qbOz7ii&" class="">Business account</a>
However, when I click the link I get the exception which is in the attached png file
I put some self._trace statements in the addBrowseValue method to check the parameters.
They seem to look fine.
Maybe anyone knows how to read and understand the exception error.
Cheers,
Rene
[attachment deleted by admin]
-
Hi Rene,
unfortunately the GPF is not helpful to me in that form - if you have GPF Reporter then add that and post what that says. If not then you need to send me an example and steps to duplicate here.
cheers
Bruce
-
Hi Bruce,
This is the log.
Cheers,
Rene
[attachment deleted by admin]
-
alas - not enough to get me closer. Can you make an example?
-
Hi Bruce,
I managed to pin down the"area" where the problem occurs.
It turned out that the record key value had lost the last character and gained a quote at the beginning.
That is short for a "quote" problem.
I changed the URL in the menu:
From:
'UpdateSEL?change_btn=change&_bidv_=' & p_web.AddBrowseValue('UpdateSEL','SEL',SEL:KeyRecordid,'<39>'&p_web.gsv('LOGIN:REL')&'<39>'))
to:
'UpdateSEL?change_btn=change&_bidv_=' & p_web.AddBrowseValue('UpdateSEL','SEL',SEL:KeyRecordid,p_web.gsv('LOGIN:REL'))
Problem solved!!
Happy New Year!!
Rene
-
that's good feeback - thank Rene.
I've tweaked the class to hopefully prevent a GPF in this situation.
(you'll have gotton other problems - like it didn't work - but at least not a GPF).
cheers
Bruce
-
Okay,
I'll force it to go wrong again and let you know the result.
Cheers,
Rene