namespace and managed packages

  • 2
  • Problem
  • Updated 1 year ago
  • Acknowledged
We're using Skuid pages in a managed package of our own. Beyond install complexities, we've had a bear of a time dealing with namespace prefixes (in snippets, static resources and Skuid pages themselves). Are there any best practices, shortcuts, anything you can point us to?
Photo of Ken Neff

Ken Neff

  • 408 Points 250 badge 2x thumb

Posted 5 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Yup, that's pretty much of a bear.  Unlike Visualforce, Skuid won't automatically update the namespacing for field names in your pages and code.  The best practice is to choose your namespace before you start development.  Of course that doesn't help much in your situation.  Sorry about that. 
Photo of Dan A

Dan A

  • 314 Points 250 badge 2x thumb
Hi Team,

Does this still represent best advice? We are having a horrible time deploying between our non-managed development organisation and our managed packaging organisation on account of namespaces; the deployments are consuming considerably more time than the actual development work.

Kind Regards,
Dan Arnison
PractiFI



Photo of Sebastian Canseco

Sebastian Canseco

  • 358 Points 250 badge 2x thumb
Hi Dan, I'm in a similar situation, I just posted a question about it with further details of our scenario. https://community.skuidify.com/skuid/topics/how_to_skuidify_our_development_deploy_and_release_proce...

Have you found a good way to solve this?
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,738 Points 5k badge 2x thumb
Hey Seb (I'm informalising your name despite not having met you) ... I work with Dan at PractiFI. The way we've worked around this is to define a namespace prefix in each of our dev orgs (ours are pfdev1, pfdev2, etc.), then when we move Skuid pages between environments, it's reasonably easy to do a find and replace of one namespace prefix with another. Previously, we didn't have a namespace prefix in dev, only in our packaging org, which meant that there was no string to find. Now we're in much better shape.
Photo of Sebastian Canseco

Sebastian Canseco

  • 358 Points 250 badge 2x thumb
Thanks Glenn! That's a very interesting approach. So you just find the dev org's namespace in the pages exported csv file and replace it with the packaging org's  and after that just do the regular import in the Skuid pages tab?

Cultural fact: I'm from Mexico and the informal or "diminutive" (as we call it) of Sebastián is Sebas. But thanks for the friendly response though!
Photo of Sebastian Canseco

Sebastian Canseco

  • 358 Points 250 badge 2x thumb
Hi Glenn, I was wondering if you had a chance to read my last question? Thanks for your time!
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,738 Points 5k badge 2x thumb
Hey Sebas ... Sorry, I missed this question 6 months ago. The answer is yes, that's roughly how we do it.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
Have there been any recent updates in this? We had our app mostly finished before moving it to a developer org so none of our custom fields or objects had namespaces...so going back through every page and snippet to update all of the calls to those pages is seemingly impossible. Any advice on fixing this if you had no prior namespace to find and replace with?
(Edited)
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,738 Points 5k badge 2x thumb
Hey Craig ... Where did you do your initial if not In a dev org? And now that the source code is in your dev org, once you add a namespace prefix in that org, does it simply flow through to the objects and fields, or are you sure you have to go into the Skuid XML do it by hand?
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
Due to some miscommunication with Salesforce, we did our initial development in our sales partner org. This being our first app, we thought that was normal. We didn't even have environment hub enabled at that time, so we had no idea.

The namespace did not pass through to Skuid to my knowledge. I'm having to go into the XML and edit every one. Is there a magic way to make it automatically transfer like in Salesforce/VF? Based on Rob's initial comment, it seems like it doesn't do it automatically. Before I spend the rest of my weekend(s) going in an changing every page I figured I should ask if there has been an update. Do you know of a way?
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,738 Points 5k badge 2x thumb
I'm afraid I don't know of a magic way to do this. We went through the same pain and it was a largely manual effort. Sorry I don't have better news. But once the namespace prefix was in place in dev, we we're in pretty good shape.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Craig - I feel your pain. 
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
Well, I suppose the best lessons are the ones learned through mistakes. 

Glad to know I'm not the only one to make this mistake. Skuid has some really great tutorials and guides, but it would be helpful for other ISV partners in the future to include a warning somewhere in the dev guide about this. I know its not a problem specific to Skuid and most experienced partners would know better, but it certainly would help.
Photo of ddeveaux

ddeveaux

  • 1,202 Points 1k badge 2x thumb
I know this is very old but to confirm, this hasn't changed? Either we develop the Skuid pages in our packaging org or we to a few search and replace as suggested and use dummy namespaces in the dev orgs?

I was just trying to package our pages in our dev org and it's just hanging. We are using a module with same namespace as package...but this isn't the packaging org its dev.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
Yes, I would highly recommend doing dummy namespaces and making it a unique term that will not be used elsewhere on your pages.