+ Start a Discussion
NapoNapo 

How to package the customer fields' security level?

Hi

 

I created a couple of customer fields on sandbox for two profiles. Then I created a unmanage package with them. After I installed the package on another sandbox, I found the field-level security  were not set correctly. So I have to reset them manually. Is there any solution for this?

 

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
JonPJonP
When you install a package that includes profiles, there's a wizard that helps you map them to the profiles in your own org.  I'm a little fuzzy on the details, but the bottom line is that yes, it is possible to include FLS in a package.  But packaging is designed for ISVs delivering solutions to multiple customers' organizations, so it's not well suited for internal IT app dev.

All Answers

JonPJonP

Packages are not a good solution for migrating changes from Sandbox to production.  Please use a metadata tool such as the Force.com IDE for Eclipse or the Force.com Migration Tool for Apache Ant.

 

Also read the Metadata API Developer's Guide to understand how the Profile object works in the metadata API. It definitely can accomplish what you want.

NapoNapo

Thanks. That means package(managed and unmanaged) can't set the field-level security?

 

JonPJonP
When you install a package that includes profiles, there's a wizard that helps you map them to the profiles in your own org.  I'm a little fuzzy on the details, but the bottom line is that yes, it is possible to include FLS in a package.  But packaging is designed for ISVs delivering solutions to multiple customers' organizations, so it's not well suited for internal IT app dev.
This was selected as the best answer
e.lestradee.lestrade

I have a similar problem but JonP's answer did not work for me.

 

As this thread is a bit old (and officialy solved), I begun another one here : http://boards.developerforce.com/t5/General-Development/How-to-include-Field-Level-Security-in-a-package/td-p/460021