Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Force.com Sites & Site.com
- :
- system.security.NoAccessException: Update access d...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
system.sec urity.NoAc cessExcept ion: Update access denied for Contact
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-12-2012 12:42 AM
hi there,
i have created a site in salesforce. I have a visual force page and controller. See below for my code
when i go to the site from the internet , i see the contact info and when hit save i get the "Update access denied for Contact " error. If you look at my controller, i am not saving or updating anything.
I would like to be able to update the contact info from the page I created.
Any help appriciated.
<apex:page controller="testpublic" showHeader="false">
<script type="text/javascript">
var __sfdcSessionId = '{!GETSESSIONID()}';
</script>
<script type="text/javascript" src="/js/functions.js"></script>
<script type="text/javascript" src="/soap/ajax/22.0/connection.js"></script>
<apex:form >
<apex:pagemessages ></apex:pagemessages>
<table width="330px">
<tr>
<td width="200px"> <apex:outputLabel value="First Name:" for="txtname" style="font-size:12px" /></td>
<td width="130px">
<!-- <input type="text" value="{!contact.FirstName}" id="fname" style="font-size:12px" /> -->
<apex:inputText id="FirstName" value="{!contact.Name}"/>
</td>
</tr>
<tr>
<td width="200px"> <apex:outputLabel value="Last Name :" for="txtname" style="font-size:12px" /></td>
<td width="130px">
<!-- <input type="text" value="{!contact.LastName}" id="lname" style="font-size:12px" /> -->
<apex:inputText id="LastName" value="{!contact.Name}"/>
</td>
</tr>
<tr>
<td width="200px"> <apex:outputLabel value="Email:" for="txtemail" style="font-size:12px" /></td>
<td width="130px">
<!-- <input type="text" value="{!contact.Email}" id="email" style="font-size:12px" /> -->
<apex:inputText id="Email" value="{!contact.Email}"/>
</td>
</tr>
<tr>
<td width="200px"> <apex:outputLabel value="Phone:" for="txtphone" style="font-size:12px" /></td>
<td width="130px">
<!-- <input type="text" value="{!contact.Phone}" id="phone" style="font-size:12px" /> -->
<apex:inputText id="Phone" value="{!contact.Phone}"/>
</td>
</tr>
<tr><td>
<apex:commandButton value="Submit" action="{!save}" />
</td></tr>
</table>
</apex:form>
</apex:page>
Controller code
---------------------------
global class testpublic
{
public Contact contact
{
get{
if(contact == null)contact= new Contact();
return contact;
}
set;
}
public testpublic()
{
contact= [select Id,Name,Email,Phone,Company__c from Contact where Email= 'my.email@bluehost.com'];
}
public PageReference save()
{
try
{
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.info, 'Nothing to save'));
}
catch(Exception ex)
{
String mess= ex.getMessage()+' Line # '+ex.getLineNumber().format();
}
return null;
}
}
Thanks
Murai
Re: system.sec urity.NoAc cessExcept ion: Update access denied for Contact
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-03-2012 09:36 PM

