You need to sign in to do that
Don't have an account?

Save doesn't work using Visualforce, partner portal and std contoller
Hi,
My Save button doesn't work
I am attempting to mimic web-to-lead and (later web-to-case) functionality using the following:
- visualforce.
- partner portal (which is free, but doesn't allow self registration)
- standard controller for lead.
- Web to lead attempt:
http://proactive.force.com/Job_Application - View your registration in the same page:
http://proactive.force.com/Job_Application?id=00Q2000000AtjQO
My Problem:
SAVE doesn't work.
In case you are curious, The reason I'm not using the standard webform is:
- I get the visual design for free
- I don't have to modify the form every time I modify a pick list (which is very annoying).
- (Later on. I can use apex code after the submission.)
- I tried to use the same page from salesforce (rather than from the site, so we have authentication).
I still CAN'T Save, BUT if there is an ?id=XXXXXXXXXX in the URL, I can make a change, and save. this works. - I'm attaching the outer part of my VF page, just so you see I'm using standarrd functionality, apex: inputfield and no special tricks.
<apex:page standardController="Lead">
<apex:form > <apex:pageBlock title="Initial Agreement" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons><apex:pageBlockSection title="Title" columns="1">
<apex:outputText ><br/>Welcome to My Application form.<br/>Please fill in the form below. </apex:outputText>
<apex:inputfield value="{!Lead.Agreement__c}" />
<!-- more input fields here -->
<!-- more input fields here -->
<!-- more input fields here -->
<!-- more input fields here -->
</apex:pageblocksection></apex:pageBlock></apex:form></apex:page>
please?
It's working. your help is much appreciated.
Is there a ready made example to do the same with web2case?
Thanks again
Hi Bulent,
is it possible to update Lead data via Sites?
i created VisualforcePage and extension class for lead standard controller,
very similar to that you've described below.
Update lead works great inside salesforce : .../apex/UpdateLead?id=000000..ABC
but when i open the lead via Sites, all fields are read only. (i use inputfield property)
Any idea?
in site security i marked Read and Create options for Lead, there are no option to mark edit
Thank you
I'm not sure, but to the best of my understanding: I think that SF distinguish between
Sites license allows you to read and create on standard objects (except products, pricebooks and ideas you only get read access)
and full access on custom objects
Hi,
thank you for your response.
i created custom object as a workaround and i want to update fields via Site.
it works fine inside salesforce, but via Site only standard field is editable (RecordName field)
all custom fields that i've created in that object don't present values.
Can you help please?
i tried to add a query instead of getrecord() - didn't work
i think that update record also doesn't work
class vfUpdate:
private final Site__c s ;
public vfUpdate (ApexPages.StandardController controller) {
cmController = controller;
this.ls = (Site__c) cmController.getrecord();
}
Page:
Thank you
Sounds to me like you should look at the persmissions
I hope this helps
Ben
Thank you Ben.
i alreay had Read Create and Edit permissions on my custom object.
Finally a problem was in Field Accessibilty permissions for Guest profile.
all custom fields by default where "hidden". once i changed it to Editable, it started to work.
Thanks to all for help !