Create New Users for OEM Application

edited May 12 in Questions
We have a white labeled OEM app and we are trying to keep the customer entirely in our VF pages. The issue arises when the customer needs to create a new user or update their org's information. It seems our only options are to either have the user go outside of our custom branded pages into the scary world of Salesforce settings, or create a partner admin user on every customer's org and have them request us to add new users, which doesn't seem efficient or viable. Have any other ISV partners found a solution to this? Last time I tried with Skuid I could display the user and company information as readonly but could not edit it. Ideally our users never have to venture out of our theme and style and into Salesforce. Do any other app developers know of a better way to create users and update company info?


  • edited September 2019

    As long as your "Admin" user has the appropriate Setup permissions, e.g. Manage Users, you should be able to build a Skuid Page for managing users / allowing an Admin to create new Users, without requiring them to go into the Setup interface.

    Here is the XML for a very basic page which would allow a user with the Manage Users Permission to edit any User record and/or create new Users
    <skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="User">   
          <model id="User" limit="100" query="true" createrowifnonefound="false" sobject="User" adapter="" type="">
                <field id="FirstName"/>
                <field id="LastName"/>
                <field id="CreatedDate"/>
                <field id="ProfileId"/>
                <field id="Profile.Name"/>
                <field id="IsActive"/>
                <field id="UserRoleId"/>
                <field id="UserRole.Name"/>
                <field id="Email"/>
                <field id="Alias"/>
                <field id="Username"/>
                <field id="LanguageLocaleKey"/>
                <field id="LocaleSidKey"/>
                <field id="TimeZoneSidKey"/>
                <field id="EmailEncodingKey"/>
                <field id="SendUserNotificationEmails"/>
          <pagetitle model="User">
                <action type="savecancel"/>
          <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="false" model="User" mode="read">
                <field id="FirstName" allowordering="true"/>
                <field id="LastName" allowordering="true"/>
                <field id="ProfileId" valuehalign="" type="REFPICK">
                <field id="UserRoleId" valuehalign="" type="REFPICK" required="false" addnoneoption="true">
                <field id="Email" valuehalign="" type=""/>
                <field id="Alias" valuehalign="" type=""/>
                <field id="Username" valuehalign="" type=""/>
                <field id="IsActive" type="" valuehalign=""/>
                <action type="edit"/>
                <action type="delete"/>
             <massactions usefirstitemasdefault="true">
                <action type="massupdate"/>
                <action type="massdelete"/>
                <view type="standard"/>
             <actions defaultlabel="Global Actions" defaulticon="sk-icon-magic" usefirstitemasdefault="true">
                <action type="multi" label="Create new User" icon="sk-icon-add">
                      <action type="createRow" model="User" appendorprepend="prepend" defaultmodefornewitems="edit">
                            <default type="fieldvalue" field="IsActive" enclosevalueinquotes="true" value="true"/>
                            <default type="fieldvalue" field="LanguageLocaleKey" enclosevalueinquotes="true" value="en_US"/>
                            <default type="fieldvalue" field="LocaleSidKey" enclosevalueinquotes="true" value="en_US"/>
                            <default type="fieldvalue" field="TimeZoneSidKey" enclosevalueinquotes="true" value="America/New_York"/>
                            <default type="fieldvalue" field="EmailEncodingKey" enclosevalueinquotes="true" value="ISO-8859-1"/>
                            <default type="fieldvalue" field="SendUserNotificationEmails" enclosevalueinquotes="true" value="true"/>
  • edited November 2015

    When I try this page (as well as the one I built) I get the "license limit exceeded" red error message. However, I'm able to add a new user via the standard salesforce interface just fine. This being in my developer org, I have plenty of platform licenses. Any idea? I figured the error was caused by the same logic that prevents me from allowing users to edit their company information but allows them to view it:
  • edited December 2016
    What Profile are you assigning the new users to? Can you verify that the Profile you're assigning your new user to is a Profile associated with a License type that you have still have available Licenses for?
  • edited November 2015
    I'm 99% sure I have licenses available and am assigning it correctly. Screenshots below:
    Available licenses: (see standard platform license)

    The standard profile I'm assigning

    The error when I create a new user
  • edited December 2016
    If this works when creating through the standard Salesforce UI, then I think the issue is not User Licenses, but Feature Licenses. The same generic error message ("license limit exceeded") is thrown in both cases, so you can't tell which is the problem, which is annoying.

    Try forcibly setting some of the *User fields to be FALSE, e.g. the following:

    - UserPermissionsSFContentUser = false
    - UserPermissionsSupportUser = false
    - UserPermissionsSiteforcePublisherUser = false
    - UserPermissionsSiteforceContributorUser = false
    - UserPermissionsInteractionUser = false
    - UserPermissionsKnowledgeUser = false 

  • edited November 2015
    I'll give it a try and let you know.

    Has there been a change by any chance to allow users to update company information through Skuid?
  • edited November 2015
    Changing the user booleans to false worked! Thanks so much!
  • edited September 2019
    I'm wanting to do something like this on Skuid Platform.  What changes would I need to make to your example?
  • edited March 2017
    Mark, do you mean you're trying to make an OEM product on Skuid Platform? If you haven't already, I would get in touch with Chris Jackson at Skuid to discuss details on the partnership side.

    In terms of adding users through the Skuid Platform pages instead of the back end ui, I'm not sure if Skuid Platform makes their user data model accessible for use on pages. 
  • edited March 2017
    Thanks for your response.  Not sure if it's what you are calling an OEM product but I'm wanting to build a SaaS application on top of Skuid where client companies can do their own user provisioning once they have been given an "admin" role of some kind.  
    BTW, I have been talking to Chris.
    I'm not sure how these responses flow but was hoping that maybe Zach would see this and respond with what to do.
    In the meantime, I'm going to try the solution posted just to see if it works.
  • BillBill ✭✭
    edited May 12
    This was very helpful.  Is there a field to check for this?   
    "Generate new password and notify user immediately"
Sign In or Register to comment.