NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Rene Simons on December 25, 2011, 03:39:59 AM

Title: Problem solved: call update form in change mode directly from menu
Post 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
Title: Re: call update form in change mode directly from menu
Post by: Robert Iliuta on December 25, 2011, 03:38:57 PM
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
Title: Re: call update form in change mode directly from menu
Post by: Rene Simons on December 26, 2011, 12:32:32 AM
Robert,

Thanks. I think this IS the answer.

Cheers,
Rene
Title: Re: call update form in change mode directly from menu
Post by: Rene Simons on December 28, 2011, 12:38:32 PM
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]
Title: Re: New problem: call update form in change mode directly from menu
Post by: Bruce on December 28, 2011, 09:47:46 PM
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
Title: Re: New problem: call update form in change mode directly from menu
Post by: Rene Simons on December 29, 2011, 09:22:33 AM
Hi Bruce,

This is the log.

Cheers,
Rene


[attachment deleted by admin]
Title: Re: New problem: call update form in change mode directly from menu
Post by: Bruce on December 30, 2011, 06:05:59 AM
alas - not enough to get me closer. Can you make an example?
Title: Re: New problem: call update form in change mode directly from menu
Post by: Rene Simons on December 31, 2011, 03:58:13 AM
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
Title: Re: Problem solved: call update form in change mode directly from menu
Post by: Bruce on January 02, 2012, 12:48:22 AM
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
Title: Re: Problem solved: call update form in change mode directly from menu
Post by: Rene Simons on January 02, 2012, 03:43:52 AM
Okay,

I'll force it to go wrong again and let you know the result.

Cheers,
Rene