function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jbowesjbowes 

Adding field to field set in managed package, not working

Hi, I'm trying out field sets and I'm having a little trouble. I added a field set to an object in a managed package, used the field set in a visualforce page, then installed the package in a test org. The page works great and includes the fields that I expected. I can remove fields from the page at will.

 

If I then add a new custom field to the managed object in the test org, and then add that field to the field set, the page no longer works. I get an "Insufficient Privileges" error. I've checked the FLS for the new field, added it to the "Standard Fields" field set (whatever that is), added it to the layout, and used an admin login with view all, and I still get the insufficient privileges.

 

Is there something else that needs to happen for a customer-added field to be added to a field set that is used in visualforce from a managed package? Am I holding it wrong?

 

Thanks in advance for any tips!

jbowesjbowes

Anyone have any luck with field sets and managed packages? I've tried a few more tests and haven't gotten it to work. Today I'm seeing this if I add a field "test__c" to a custom object "myNamespace__myObject__c" from a managed package, add it to a field set that's used in a visualforce page, then view the page:

 

Object type not accessible. Please check permissions and make sure the object is not in development mode: id, lastmodifieddate, ownerid, myNamespace__test__c FROM myNamespace__myObject__c ^ ERROR at Row:1:Column:203 No such column 'myNamespace__test__c' on entity 'myNamespace__myObject__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

 

It makes sense that the newly added field isn't called myNamespace__test__c since it's not in the package. How is one meant to use this feature? Is it not possible for an admin that has my package installed to add new custom fields to a field set? I was hoping that orgs that installed my package would be able to add fields to my visualforce pages using this, but I'm not sure how to make this work.

jbowesjbowes

Just to carry on the conversation with myself..

 

I've found that this works in dev orgs. All the ones I tried have namespaces set, and I notice that when adding the new field to the field set in the "subscribing" org the namespace is included in parentheses. Perhaps this only works in orgs that have a namespace?

aballardaballard

It sounds liek you may have found a problem.   We'll look into it, but you might want to file a support case.

jbowesjbowes

Thanks, I opened case 04912014 for this last Friday. I'm hopeful that this will get sorted soon, I'm really looking forward to being able to use this.

TLFTLF

jbowes, you are not alone. I encountered this myself today, prior to seeing your post. I'll open a case of my own to hopefully raise it's visibility within Salesforce's support group.

TLFTLF

By the way, I'm able to add custom fields from another managed package to my packaged fieldset and have them display properly on my VF page. It's only when I add a non-namespaced custom field to my fieldset that I get the "Insufficient Privileges" error.

jbowesjbowes

I found the same thing. I talked to someone from support on 3/13 and gave them info on the packages and the problem, but I haven't heard back since. If I get any info from them I'll add it here.

TLFTLF

Here's the reply I got from Salesforce support:

---------------------------------------

The real error looks like this:
Object type not accessible. Please check permissions and make sure the object is not in development mode: davepackager__customtextarea__c, description, id, DavePackager__mycustomdatetime__c ^ ERROR at Row:1:Column:212 No such column 'DavePackager__mycustomdatetime__c' on entity 'Campaign'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

It appears that the namespace of the field set is being added to the custom fields incorrectly. Standard fields and fields from other name spaces do not appear to be affected. I suspect this is a bug, so I am escalating to have this confirmed. I will keep you updated.

---------------------------------------

aballardaballard

Sorry this is taking a while.   I have verified there is a bug as you describe and entered an internal bug report.

 

If you contact support again you can ask them to link your case to work item W-931114 .

Nickname7Nickname7

Has the fix been released for this?

jbowesjbowes

It looks like the fix is in Summer 11. I've tested it out in a sandbox that's been updated and it works there, although not in prodution yet.