You need to sign in to do that
Don't have an account?
SkyBlue2007
User Object Update doesn't work !.
Hi all,
I tried to update User Object, but it didn't work.
Then I got an error message which is '"Update failed. First exception on row 0; first error: MISSING_ARGUMENT, Id not specified in an update call: []".
Here is VF.
<apex:page standardController="User" extensions="userExtension2" sidebar="false"> <apex:pageMessages showDetail="true" /> <apex:sectionHeader title="AAA" subtitle="{!$User.LastName} {!$User.FirstName}"></apex:sectionHeader> <apex:form > <apex:pageBlock title="BBB"> <apex:pageBlockButtons> <apex:commandButton action="{!save}" value="save"></apex:commandButton> <apex:commandButton action="{!cancel}" value="cancel"></apex:commandButton> </apex:pageBlockButtons> <apex:pageBlockSection title="CCC" collapsible="false" columns="1"> <apex:inputField value="{!User.testField1__c}"></apex:inputField> <apex:inputField value="{!User.testField2__c}"></apex:inputField> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
Here is Controller Extensions.
public class userExtension2 { private final User u; public userExtension2(ApexPages.StandardController stdController) { this.u = (User)stdController.getRecord(); } public PageReference save() { try { update u; } catch (DmlException e) { } } return null; }
Are you passing id in youe query srtring.
add id in query string like this
/aspx/YourPageName?id=userid
userid is the is that you want to update
All Answers
Are you passing id in youe query srtring.
add id in query string like this
/aspx/YourPageName?id=userid
userid is the is that you want to update
Hi Shashikant ,
Thank you for your prompt reply.
I've solved my problem.
Thanks,
Seiji
Did you solve the problem with the solution provided, or by other means?
i'm having the same issue.
Thanks
Hi JoeyD,
I solved the problem with the solution provide.
Here's a Controller before transition.
Here's a Controller after transition.
Thanks,
SkyBlue2007