You need to sign in to do that
Don't have an account?
Dhilip Dussa
create a user By using visualforce standard controller only
Hii..
create a user By using visualforce standard controller only
create a user By using visualforce standard controller only
<apex:form>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:inputField value="{!user.firstname}"/>
<apex:inputField value="{!user.lastname}"/>
<apex:inputField value="{!user.Email}"/>
<apex:inputField value="{!user.profileid}"/>
<apex:inputField value="{!user.CommunityNickname}"/>
<!--<apex:inputField value="{!user.UserLicense}"/>-->
</apex:pageBlockSection>
</apex:pageBlock>
<apex:commandButton value="save" action="{!save}"/>
</apex:form>
</apex:page>
Try the below code. User object has additional required fields in addition to your fields.
Hope this helps ! Mark it as solved if it did.
Thanks,
Sarvani
system.setpassword(UserID; Password)
or use EmailHeader
Try the below code.
<apex:page standardController="Account">
<apex:form>
<apex:pageBlock title="My Content" mode="edit">
<apex:pageBlockButtons>
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="My Content Section" columns="2">
<apex:inputField value="{!account.name}"/>
<apex:inputField value="{!account.site}"/>
<apex:inputField value="{!account.type}"/>
<apex:inputField value="{!account.accountNumber}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
You should use all mandatory field to create user. Please try the below code its works fine for me:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi