License and Permission Assignments

Note

Within the Salesforce universe, the term “Skuid license” refers to a user’s ability to interact with Skuid. While the Skuid UI reflects this terminology to avoid confusion, the “number of Skuid licenses” you have refers to purchased Skuid subscriptions.

Any end user who will be viewing Skuid needs to be assigned a Skuid license and the Skuid Page Viewer permission set. Any user who will be editing Skuid Pages needs to be assigned the Skuid Page Builder Permission set.

Warning

When using Skuid as a Salesforce managed package (Skuid on Salesforce), all licensed Skuid users must also have a valid Salesforce license.

Like any other Salesforce Custom Objects, you can configure security, sharing and permissions for the Skuid Page and Page Assignment objects. We recommend you configure the sharing setting for these objects to public read only.

  • The Skuid Page Viewer permission set lets end users read Pages and Page Assignments.
  • The Skuid Page Builder permission set lets end users read, create, edit and delete Pages, Page Assignments, Page Revisions, and other objects in the Skuid package.
  • The Skuid Admin permission set gives users the same options as the Skuid Page Builder permission set, and also allows access the XML Editor on Skuid pages.
  • Out of the box, none of these permission sets have View All and Modify All permissions on these objects.

Warning

It’s important to utilize a sandbox environment to test all aspects of your Skuid configuration, and this includes license assignments. By default, Salesforce assigns a site license in sandbox orgs—meaning assigning individual licenses is not possible.

To accurately test how automatically assigning licenses could affect your configuration, please contact salesops@skuid.com to limit your sandbox licenses to a specific number of users—allowing you to assign and test properly.

The Licensing / Permissions screen

To access Skuid’s license and permission set tools, navigate to Settings > Licensing / Permissions. This screen is made up of several sections, the most important of which allow for auto-assigning and auto-revoking of licenses and permission sets.

There are two primary ways of setting assign/revocation rules for licenses and permission sets in Skuid:

  • Whenever a user in your org is created / activated / deactivated (Configured in the Org Defaults section)
  • Whenever a a user with a specific profile is created/ activated / deactivated in your org (Configured as multiple rules in the Profile-specific settings section)

Note

Changes made to a Salesforce user other than creating / activating / deactivating will not be reflected in that user’s licensing or permissions settings in Skuid.

User Licensing / Permissions

This area contains links to Salesforce setup pages that allow you to manually assign Skuid licenses and permission sets.

By visiting these links (or navigating the Salesforce setup UI), you may assign Skuid’s necessary permission sets to single users or to multiple users as noted in Salesforce documentation.

Org Defaults

This area contains tool to manage auto-assigning or auto-revoking licenses and permission sets from all new users or all deactivated users.

Package licenses

To auto-assign licenses to any user when they are created / activated:

  1. Enable Auto Assign Licenses on Activation.

  2. Click the Packages to Auto-Assign Licenses to setting to pick one or more package licenses to assign.

    This means you can auto-assign licenses to Skuid and any other packages listed in the dropdown menu.

To auto-revoke licenses of deactivated users:

  1. Enable Auto Revoke Licenses on Deactivation.

  2. Click the Packages to Auto-Revoke Licenses to setting to pick one or more package licenses to revoke.

    This means you can auto-revoke licenses to Skuid and any other packages listed in the dropdown menu.

Permission sets

To auto-assign permission sets to any user when they are created / activated:

  1. Enable Auto Assign Perm Sets on Activation.

  2. Click the Permission Sets to Auto-Assign setting to pick one or more permission sets to assign.

    This means you can auto-assign Skuid’s own necessary permission sets and any other permission sets listed in the dropdown menu.

To auto-revoke permission sets of deactivated users:

  1. Enable Auto Revoke Perm Sets on Deactivation.

  2. Click the Permission Sets to Auto-Revoke setting to pick one or more permission sets to assign.

    This means you can auto-revoke Skuid’s own necessary permission sets and any other permission sets listed in the dropdown menu.

Profile-specific Settings

If you want to specify which licenses and permission sets are auto-assigned/revoked to specific profiles, you can do so by adding profile-specific rules in this section.

Once you set up a profile-specific rule, the selected licenses/permission sets are auto-assigned/revoked when any user with that profile is created/ activated / deactivated in your org.

Note

It is possible to use profile-specific settings instead of or in addition to org defaults.

To add a profile-specific rule:

  1. Click Add within the Profile-specific settings section.

  2. Start typing the name of one of your Salesforce profiles and select it from the list.

  3. Check the boxes of the things you want to be auto-assigned/revoked.

    The options available in the modal mirror those described in the Org Defaults section.

  4. Click Add to save the rule.

Other Assignment Methods

Mass assign licenses using Data Loader

It’s also possible to mass assign licenses to a number of end users through Salesforce’s Data Loader tool. This can be especially useful for an initial rollout, where auto-assgining licenses may not help since users are already activated.

For more information, see Salesforce’s knowledge article.

Anonymous Apex script: Mass Assign the Skuid Page Viewer Permission Set

Warning

The scripts below are only examples of how this can be done. We recommend having an admin fluent in Apex modify this script for your org’s needs. And as such, the insert assn statement must be uncommented for the scripts to take effect.

Using this script without understanding its impact could have unintended consequences. Use at your own risk.

Assign a Skuid permission set to all active SFDC/AUL licenses

This anonymous Apex script can be run by an admin to help mass assign the Skuid Page Viewer Permission Set to all active Salesforce licensed-users who do not already have the permission set. Be sure that this is what you want to do before using this script.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
////////////////////////////////////////////////////////////////
// Assign a Skuid Permission Set to all active SFDC/AUL licenses
////////////////////////////////////////////////////////////////
PermissionSet ps = [SELECT Id, Name FROM PermissionSet WHERE Name = 'Skuid_Page_Viewer' limit 1];
List<PermissionSetAssignment> assn = new List<PermissionSetAssignment>();
List<User> users = [
  SELECT Id
  FROM User
  WHERE Id NOT IN (SELECT AssigneeId FROM PermissionSetAssignment WHERE PermissionSetId = :ps.Id)
  AND Profile.UserLicense.LicenseDefinitionKey IN ('AUL', 'SFDC')
  AND IsActive = true
  LIMIT 10000
];
for (User u : users) {
  assn.add(new PermissionSetAssignment(
    AssigneeId = u.Id,
    PermissionSetId = ps.Id
  ));
}
//system.assert(false,assn.size());
try {
//  insert assn;
    system.debug('Permission Sets Assigned => ' + assn.size());
} catch (Exception ex) {
  system.assert(false, ex.getMessage());
}

Assign a Skuid permission set to all active Skuid licensees

The following code assigns permission sets to all users assigned a Skuid license who do not already have the permission set. Remember, test and adjust the code to meet your needs.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//////////////////////////////////////////////////////////////
// Assign a Skuid Permission Set to all active Skuid licensees
//////////////////////////////////////////////////////////////
PermissionSet ps = [SELECT Id, Name FROM PermissionSet WHERE Name = 'Skuid_Page_Viewer' limit 1];
List<PermissionSetAssignment> assn = new List<PermissionSetAssignment>();
String APP_NAMESPACE_PREFIX = 'skuid';
List<User> users = [
    SELECT Id
    FROM User
    WHERE Id NOT IN (SELECT AssigneeId FROM PermissionSetAssignment WHERE PermissionSetId = :ps.Id)
    AND Id IN (
            SELECT UserId
            FROM UserPackageLicense
            WHERE PackageLicense.NamespacePrefix = :APP_NAMESPACE_PREFIX
        )
    AND IsActive = true
    LIMIT 10000
];
for (User u : users) {
    assn.add(new PermissionSetAssignment(
            AssigneeId = u.Id,
            PermissionSetId = ps.Id
    ));
}
//system.assert(false,assn.size());
try {
//  insert assn;
    system.debug('Permission Sets Assigned => ' + assn.size());
} catch (Exception ex) {
    system.assert(false, ex.getMessage());
}

Other Considerations

Skuid Sample Page: License Management

If you commonly need to see an overview of active Skuid licenses within your org, consider implementing this License Management sample page in your Salesforce org.

Non-Skuid users will still access standard layouts

If you use the tutorials for overriding tabs in Salesforce, (either using page assignments or direct visual force page overrides) users without Skuid licenses or privileges will still be able to access the standard salesforce layouts.

User with a Skuid Subscription

When you override standard Salesforce pages with your own Skuidified one, a user who has a Skuid subscription will see a Skuid page:

User without a Skuid Subscription

Users that do not have Skuid subscriptions will see the standard Salesforce Layout

In Salesforce Setup, make Pages and Page Assignments Public Read Only

image2

Change the Default Access for Page and Page Assignment to “Public Read Only” and then click Save.

image3

We recommend that you set the Default Access for the Page, and Page Assignment objects to Public Read Only.

Troubleshooting

If you are making user-level changes in Saleforce, yet the license and permission sets stipulated in your Organization-wide Defaults or Profile-specific Settings are not correctly being assigned or revoked from the user, note that Skuid’s Organization-wide Defaults and Profile-specific Settings are assigned upon the creation, activation, or deactivation of a user. No other types of user changes will trigger this automatic assignment/revocation of license and permission sets.

If you wish to make other types of changes to a user in Salesforce, and want to also change their Skuid licensing or permission sets:

  • In the User Detail page, deactivate the user.
  • Make the changes and Save.
  • Reactivate the user with the new settings.

If you need to manually remove or add Skuid licenses, you can do so by following the process outlined by Salesforce for assigning licenses for managed packages. You will also need to manually add and remove the Skuid permission sets for those individuals.

Potential error messages

  • SObject row was retrieved via SOQL without querying the requested field: skuid__Page__c.skuid__MasterPage__r  An unexpected error has occurred. Your solution provider has been notified.

    This often shows if a user does not have the Skuid Page Viewer permission set. If a builder sees this message, verify they have the Skuid Page Viewer permission set assigned to them.

  • It’s possible for a builder to see a variety of field relationship request errors in the Composer if the Skuid Page Builder is not assigned. If a builder sees error messages similar to the shortened examples below, verify they have the Skuid Page Builder permission set assigned to them.

    • A Skuid Model, 'page', requested a Field with relationship name ...
    • A Skuid Model, 'pageBuilder_SelectedVersion', requested a Field with relationship name ...
    • A Skuid Model, 'pgs__NewPage', requested a Field with relationship name ...
    • A Skuid Model, 'versions', requested a Field with relationship name ...
    • A Skuid Model, 'ClonePageData', requested a Field with relationship name ...

If you have other Apex triggers

Due to Salesforce restrictions regarding setup object operations, Skuid’s triggers may not function well in combination with other user-creation triggers. If Skuid’s triggers and your triggers are grouped as a single transaction, you may see unexpected behaviors or your licenses and permissions may not assign properly.

If you have existing user-creation triggers, or wish to implement additional triggers, consider one of the following alternatives:

  • If you “own the code” for the additional triggers, consider placing setup object DML statements within future methods to ensure that they run within a separate transaction.
  • If you do not wish to use future methods, consider writing your own auto-licensing and permission granting functionality into new or existing functions. This will give you greater control over how and when licenses are assigned and will reduce the likelihood of undesired results.

Trouble viewing pages in Skuid on Salesforce?

You’ve created an app, built multi-featured pages, and deployed to give your users access. (Congratulations!) Except…they can’t see the pages. What’s up with that?

Below are a few issues that might be preventing a user from viewing pages. Is the user assigned a Skuid license or subscription?

Note

Some users have more than one User ID; make sure the one they are using to access the page is included in the list of Licensed Skuid users:

  1. In the Salesforce Setup pane, navigate to Build > Installed Packages.
    • Does the User have Skuid installed?
    • Do they have the correct version installed?
  2. To see which IDs are licensed to use Skuid in the user’s dev org, click Manage License.

Managing licenses in sandboxes

In Salesforce sandbox orgs, you are given a site license, which means there’s no need to assign licenses to sandbox users. However, when you deploy to a production org, it’s critical to make sure all intended users have Skuid licenses. Users who were able to access the page in the sandbox will not be able to see it in production unless they have an assigned license/subscription.

Prefer to limit your Skuid licenses in a sandbox, to more accurately test your deployment? Doing so allows you to assign and test licenses for a more realistic view of how your licensing assignments work within your configuration. To limit licenses, make the request to salesops@skuid.com, with your sandbox org ID and the number of licenses you’d like to activate for that org.

Does the user have the correct permission set?

To view a Skuid page, they need to have the Skuid Page Viewer Permission set enabled.

  1. In the Salesforce Setup pane, navigate to Administer > Manage Users > Users.
  2. Click on the appropriate user
  3. Under Permission Set Assignments, check to see that they have Skuid Page Viewer assigned.
  4. If not, click Edit Assignments:
    • Select the Skuid Page View permission set from the Available Permission Sets list on the left and use the Add/Remove buttons to add them to the Enabled Permission Sets list on the right.

Are the Skuid pages public?

If the page is not public, only designated profiles, such as other Admins, can see it. Note: Skuid pages and page assignments are, by default, always private. Unless you changed this setting when you were building pages in the sandbox, deployed pages and page assignments will always need to be made public.
  1. In the Salesforce Setup pane, navigate to Administer > Security Controls > Sharing Settings.
  2. Under Sharing Settings, check that Page and Page Assignment are both set to Public Read Only.
  3. If not, click Edit:
    • Update the settings for Page and Page Assignment.
    • Click Save.

Does the user’s profile have access to the VisualForce pages associated with the Skuid pages?

To view a Skuid page, they need to have the Skuid Viewer Permission set.

  1. In the Salesforce Setup pane, navigate to Administer > Manage Users > Profiles.
  2. Click on the appropriate profile(s)
    • Enabled Visualforce Page Access, check to see that the page(s) are enable.
  3. If not, click Edit:
    • Select the page(s) from the Available Visualforce Pages list on the left and use the Add/Remove buttons to add them to the Enabled Visualforce Pages list on the right.

Does the user’s profile have appropriate access to the objects or entities?

  1. In the Salesforce Setup pane, navigate to Administer > Manage Users > Permission Sets.
  2. In the Find Settings search field at the top, enter the name of the object and select it from the dropdown list.
  3. Click Edit.
    • Scroll to Object Permissions and (Standard, Custom, and/or External, depending upon the object you are giving permissions to) and select the permissions for that object.
  4. Click Save.

Have page assignments been set up correctly, and buttons and links been over-ridden?

Need help with this? Check out the topic on Page Assignments.