Skip to main content

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?

Craig,


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">   
<models>
<model id="User" limit="100" query="true" createrowifnonefound="false" sobject="User" adapter="" type="">
<fields>
<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"/>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<pagetitle model="User">
<maintitle>
<template>{{Model.labelPlural}}</template>
</maintitle>
<subtitle>
<template>Home</template>
</subtitle>
<actions>
<action type="savecancel"/>
</actions>
</pagetitle>
<skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="false" model="User" mode="read">
<fields>
<field id="FirstName" allowordering="true"/>
<field id="LastName" allowordering="true"/>
<field id="ProfileId" valuehalign="" type="REFPICK">
<label>Profile</label>
</field>
<field id="UserRoleId" valuehalign="" type="REFPICK" required="false" addnoneoption="true">
<label>Role</label>
</field>
<field id="Email" valuehalign="" type=""/>
<field id="Alias" valuehalign="" type=""/>
<field id="Username" valuehalign="" type=""/>
<field id="IsActive" type="" valuehalign=""/>
</fields>
<rowactions>
<action type="edit"/>
<action type="delete"/>
</rowactions>
<massactions usefirstitemasdefault="true">
<action type="massupdate"/>
<action type="massdelete"/>
</massactions>
<views>
<view type="standard"/>
</views>
<actions defaultlabel="Global Actions" defaulticon="sk-icon-magic" usefirstitemasdefault="true">
<action type="multi" label="Create new User" icon="sk-icon-add">
<actions>
<action type="createRow" model="User" appendorprepend="prepend" defaultmodefornewitems="edit">
<defaults>
<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"/>
</defaults>
</action>
</actions>
</action>
</actions>
</skootable>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
</skuidpage>

Zach,

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: https://community.skuid.com/t/organization-object-page-not-editable


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?


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


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 



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?


Changing the user booleans to false worked! Thanks so much!


I’m wanting to do something like this on Skuid Platform.  What changes would I need to make to your example?


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. 


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.


This was very helpful. Is there a field to check for this?

“Generate new password and notify user immediately”