Use apex to package and unpackage pages in a module?

Hi Zach, wanted to follow up and see if you had information on an auto update of page assignments like you mentioned above. 

Hi Zach, wanted to follow up and see if you had information on an auto update of page assignments like you mentioned above. 

Zach, just a bump to see if you could send some examples of the auto deployment page assignments like you mentioned above. 

Zach, just a bump to see if you could send some examples of the auto deployment page assignments like you mentioned above. 

Hi Zach, to upsert the pages form pagepack (static resource) we were using another following version of skuid Utils method:

static skuid.Utils.PageRefreshResult RefreshPagesFromStaticResource(List srList)

in our postinstall script . However, its preventing us from package install now ( I got error while installing Beta package in test org).

Here’s how our postinstall class looks like:

global class PostInstallScript implements InstallHandler {    public PostInstallScript() {}
    global void onInstall(InstallContext context) {
        // if this is an upgrade
        if(context.isUpgrade() || context.isPush()) {
            // upsert Skuid pages
List<StaticResource> srList = new List<StaticResource>();
for(StaticResource s : [select Id, body from StaticResource where Name like '%allOther_skuidUpdate']){
srList&#46;add(s);
}            
try {
skuid&#46;Utils&#46;RefreshPagesFromStaticResource(srlist);
}
catch(exception e) {
system&#46;debug(e);
}
                        
        }        
    }
}

Any idea why we are getting package install failure?

Thanks.
Gyan

Jnanendra,

I think we’ve had issues using the Utils methods in Post Install Scripts because Utils.cls is declared with sharing and the “Ghost User” that is actually running the script doesn’t handle it. It could be something else, but that’s the first thing that comes to mind. If you try running the query and call to Utils.RefreshPagesFromStaticResource via Anonymous Apex, does it work?

Hi J., 

Thank you for your reply. Yes running Utils.RefreshPagesFromStaticResource  from Anonymous apex works. Not only that, it worked from PostInstall script as well previously (in previous version of PractiFI). Then I used another approach that skuid provided in tutorial which worked well so I was happy until I got issue with Master page. Please see my post at: 

Deploying Child Pages with Post Install Apex Script

http://community.skuid.com/skuid/topics/deploying-child-pages-with-post-install-apex-script?topic-r…

And lastly, I am not getting any notification for the community post update (I have opted in for getting notifications). Any Idea?

Kind regards,

Gyan (Jnanendra)