Skuid Pages packaged into module not visible in new org

  • 1
  • Question
  • Updated 5 years ago
  • Answered
I've created a managed package, I've also added our namespace as a picklist item in the Module__c field in the page object. I've then used the 'Package Pages in Module' button, and packaged up all the pages in the module I want to deploy. It creates the static resource, which appears to contain the right pages. HOWEVER, when I install the package into the new org, I see all the pages EXCEPT the ones I packaged up in the module.

I can't understand why the pages I packaged up aren't there, but I also can't understand why the pages I didn't package up, ARE there!! I've tried a couple of times now and can't get my head around it.

I've double-checked that I've added our namespace into the new org prior to installing the package, and that didn't make a difference either.

Any help is appreciated on this. 
Photo of Greg Jarrett

Greg Jarrett

  • 3,526 Points 3k badge 2x thumb

Posted 5 years ago

  • 1
Photo of J.

J., Official Rep

  • 7,826 Points 5k badge 2x thumb

It sounds like you've got the pages packaged up into a Static Resource and you've got that Static Resource migrated to your new Org like you want, but there is one more step: unpacking the pages from the Static Resource. Right now, you can run the following anonymous Apex script in your new Org to unpack the pages (changing the values of ModuleName1 and ModuleName2 as needed, of course):
List<String> modules = new List<String>{'ModuleName1','ModuleName2'};

for (String module : modules) {
	StaticResource sr;

	if (sr == null) {
		try {
			sr = [
				select Body
				from StaticResource
				where Name = :(module + 'Pages')
		} catch (Exception ex2) {}

	// The Pages for our module that we will be upserting
	List<skuid__Page__c> newPages = (List<skuid__Page__c>) JSON.deserialize(sr.Body.toString(),List<skuid__Page__c>.class);

	// Clear out any Page Ids that were packaged with the Pages
	for (skuid__Page__c p : newPages) {
		p.Id = null;

	// If we have any pages, upsert them
	if (newPages != null && !newPages.isEmpty()) {
		Schema.SObjectField f = skuid__Page__c.Fields.skuid__UniqueId__c;
		Database.UpsertResult [] cr = Database.upsert(newPages,f, false);
Honestly, we know that this is less than straightforward or intuitive, and it's one of the areas that we're really focusing on in our upcoming Summer release (stay tuned!). Of course, you can always try this out and preview the results in a Sandbox first, if you would like. Does this get you up and running?
Photo of Greg Jarrett

Greg Jarrett

  • 3,526 Points 3k badge 2x thumb
Actually that worked brilliantly, thanks J. Very easy. HOWEVER...I now have another problem!

None of the page assignments I create in the new org (a production Enterprise edition) are working for users with a 'Salesforce Platform' License type. Straight forward page overrides work fine for these users, but when I try to implement page assignments based on user profile, the override defaults back to the standard salesforce layout, for anyone with a 'Platform' licence type. System Admin profile works fine with overrides.

I've double & triple checked that all the users have the Skuid page viewer permission set, licences are activated, and VF page security is enabled for the required pages. I've also tried re-creating the pages natively in the new org, but still the page assignments don't work.

I can only think that it is related to the 'Platform' licence type. But those profiles work fine in my dev org.

Anyone have any ideas?
Photo of Greg Jarrett

Greg Jarrett

  • 3,526 Points 3k badge 2x thumb
the resulting URL I get when the page defaults to standard layout is: 

Photo of Greg Jarrett

Greg Jarrett

  • 3,526 Points 3k badge 2x thumb
So after much ado - it turns out that a simple security setting was preventing the page assignments from being used by platform users!

For each of my custom profiles with a 'Standard Platform' Licence - Simply having the 'Read' permission enabled in profile settings for the Page Assignments object was not enough. Users require the 'View All' checkbox enabled under Data Administration for the Page Assignments object.

Its always the little things isn't it!!
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,550 Points 10k badge 2x thumb
Hi Greg, I'm glad you got that working.  Another method that you could use instead of giving your Users "View All" on page assignments is to change the Org Wide Defaults on page assignments from "Private" to "Public Read Only".