NetTalk Central

Author Topic: Problem solved: call update form in change mode directly from menu  (Read 4982 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
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
« Last Edit: December 31, 2011, 03:58:58 AM by Rene Simons »
Rene Simons
NT14.14

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: call update form in change mode directly from menu
« Reply #1 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

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: call update form in change mode directly from menu
« Reply #2 on: December 26, 2011, 12:32:32 AM »
Robert,

Thanks. I think this IS the answer.

Cheers,
Rene
Rene Simons
NT14.14

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: call update form in change mode directly from menu
« Reply #3 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]
« Last Edit: December 28, 2011, 12:45:53 PM by Rene Simons »
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: New problem: call update form in change mode directly from menu
« Reply #4 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

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: New problem: call update form in change mode directly from menu
« Reply #5 on: December 29, 2011, 09:22:33 AM »
Hi Bruce,

This is the log.

Cheers,
Rene


[attachment deleted by admin]
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: New problem: call update form in change mode directly from menu
« Reply #6 on: December 30, 2011, 06:05:59 AM »
alas - not enough to get me closer. Can you make an example?

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: New problem: call update form in change mode directly from menu
« Reply #7 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
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Problem solved: call update form in change mode directly from menu
« Reply #8 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

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Problem solved: call update form in change mode directly from menu
« Reply #9 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
Rene Simons
NT14.14