You need to sign in to do that
Don't have an account?
Jingli Hu 3
user who don't have create permission create record from VF page
Hi,
We have a profile which we don't want to grant create permission to it. since we don't want them to use New button in the object tab to create record. instead , they should click some detail button which will open VF page, and then create record from there. since the apex is running in system mode, we thought it should work. but I keep having problem. in the VF Page controller's constructor, we create a custom object new instance. and in the VF page, we want to display fields by using <apex:inputfield > tab. but none of the field is shown up. we have tried the standard controller extension and custom controller. none of them working. Any suggestions?
Thanks,
We have a profile which we don't want to grant create permission to it. since we don't want them to use New button in the object tab to create record. instead , they should click some detail button which will open VF page, and then create record from there. since the apex is running in system mode, we thought it should work. but I keep having problem. in the VF Page controller's constructor, we create a custom object new instance. and in the VF page, we want to display fields by using <apex:inputfield > tab. but none of the field is shown up. we have tried the standard controller extension and custom controller. none of them working. Any suggestions?
Thanks,
Hi,
As per my knowledge the apex i.e. controller classes runs in system mode but the <apex:inputfield > is a visual orce tag which implies the field integrity things from salesforce such as field format(text/phone number/large text area) and required and field visibility also. So that might be the reason you are not seeing any fields on VF page. Another thing to check is if you have removed Edit access too for that profile along with Create that can also be a reason.
If those profile changes does not work then you can use other visualforce tags for fields such as <apex:inputText > (https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_inputText.htm). This will not imply salesforce's field integrity things.
Hope this helps you.
Thanks,
Pankaj.