This is the scenario:
I have a custom object myObject__c and two VF pages which have the object as standardController and MyObjectController.cls as extension.
The class is a StandardController that has 2 methods. The first one is called from the first page and it redirects you to the second page and the second method does the same, I mean, it redirects you to the first page. But they don’t do anything else, any kind of DML operation.
I have overriden also “view” with the first VF page, so everytime I open a myObject__c record, I can see my first VF with the button that redirect me to the second page.
Now, I create a permission set that has only Read Access to myObject__c, Tab access and also, to the 2 VF pages.
If I try to test it as an user with only this permission set and an empty profile (only access to standard objects) I’m not able to navigate from the first page to the second one and viceversa. However if I add myObject__c Edit access to the permission sets, it works properly.
Does anyone know the reason? Or what am I doing wrong?
Many thanks in advance.
Augustina – I would definitely test this using just profiles first and then with permission sets to ensure there isn’t a discrepancy between the two. If it works with just read on profile (no permission set assigned) but read/edit on permission set (no access granted on profile, then there’s probably a bug that needs to get filed with support. However, if it’s consistent between the two where read/edit is required regardless even though you’re not performing DML, than there’s a whole other reason and we need more information here. AFAIK,there’s no reason I can think of why Edit would be needed at this point unless you were trying to perform some additional DML action like changing the owner.