FORUMS

c360 Forums
 Home        Members    Calendar    Who's On

Welcome Guest ( Login | Register )
      



SavePage.SaveData() help/info neededExpand / Collapse
Message
Posted 5/8/2007 5:16:12 AMPost #1454
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
Hi,

I am using the SavePage for the first time, and just wanted to hear I you guys could help me with some clarification before I do "the wrong thing"

I am trying to understand how I access the values of various controls on such a page in the SaveData() method. I have a savepage with both Plain Old Asp.net Controls (POACs) as well as c360 controls. When just naïvely accessing the controls values from the SaveData() method, the controls have been reset to their "default" values, presumably because a postback has happened and the values were not stored anywhere. I would have thought that at least the POACs' values would be available after postback because of the ViewState?

Is the correct AND only way to access the values of the controls in the SaveData by "scraping" the form using the SavePreHandler javascript method? There is no way to access them in a regular codebehind-fashion?

TIA

- Henrik Nielsen

--
Henrik Nielsen
Posted 5/8/2007 4:21:55 PMPost #1458
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
Is the correct AND only way to access the values of the controls in the SaveData by "scraping" the form using the SavePreHandler javascript method? There is no way to access them in a regular codebehind-fashion?

The save page was definetly designed with a "AJAX" style save mechanism in mind rather than the usual ASP.NET post-back. The reason behing that it matches the way Microsoft CRM behaves. The intended way for you to save the data provided by the user is to implement the client-side "Validation" and the "PreSave" handlers and the "SaveData" server-side method.

There are some examples included with the SDK that you should look at and use as a template.

 

Posted 5/9/2007 3:39:25 AMPost #1460
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
Hi Jeremie,

Ok, thanks for your answer. I did get it to work, the samples helped out a lot, as well as previous forum posts by you and others.

I have to say - and I think other people on this forum have mentioned it before as well - that the Toolkit training guide could probably use a brush up on the documentation on the signatures of the javascript functions

But the samples are great, and in any case I'm the kind of guy that best learns from good examples, so if the choice is between updating/maintaining the training guide and producing new samples, I'm all behind new samples, but that might just be me

On that note, maybe a more "fully fledged" sample of a savepage might be in order? One where all the supported client side handlers are in play, to more clearly show the flow of data? Just a suggestion. Maybe I should do one, if I can find the time: "How I Learned to Stop Worrying and Love the SavePage"

- Henrik

--
Henrik Nielsen
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: kanika.jackson, Ken Champion

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 9:47am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.094. 10 queries. Compression Enabled.