+ Start a Discussion
Rakesh KumarRakesh Kumar 

actionFunction method is not working..

Hi all,

 

I have custom VF page and in which i am using onChange javascript action method. According to onchange the dependent Pick list 's value will change.

 

Problem:

If i change the profile permission for Visualforce page/Custome Object as Read Only then it will not work. But if i will give Read and Create Permission for VF/Custome Object then every thing is working Fine.

 

I don't know what is exact problem. If any one has faced such type of issue before then please share it. May be that will help me to understand the root cause.

 

Thanks

R.K

 

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

Do you have a pagemessages component in your page? If so, does that display any errors?

 

It sounds like you need create permission to be able to carry out a postback of the page, which doesn't quite make sense as you aren't saving to the database (at least I'm assuming you aren't).

All Answers

bob_buzzardbob_buzzard

When you are referring to read and create - is that a permission on the visualforce page or is it a permission on the object that the visualforce page is managing?

Rakesh KumarRakesh Kumar

Hi Bob,

 

i assign a "Custom Object Permissions"  not visualforce permission. It's type'os problem.

 

Rk

bob_buzzardbob_buzzard

Do you have a pagemessages component in your page? If so, does that display any errors?

 

It sounds like you need create permission to be able to carry out a postback of the page, which doesn't quite make sense as you aren't saving to the database (at least I'm assuming you aren't).

This was selected as the best answer
Rakesh KumarRakesh Kumar

 

you are right i am not saving value in to database.But according to your advice i got such error messages

 

ERROR :'system.security.NoAccessException: Create access denied for Patient_Survey_FLine_onc_nov__c'

 

Accordint to error message i can understand that its System.security access problem.

 

Is there any solution to solve such problem?

 

Thanks

Rakesh

bob_buzzardbob_buzzard

I'd say that clearly points you at the solution you identified - the user needs create permission on the object.

Rakesh KumarRakesh Kumar

Hi Bob,

 

You are right that if i will give create permission then it will work but such field is not create in the Custome Object Field.It is just code level setter and getter method.

I am wondering that why it is need create permission for rendering picklist value even though i am not storing in database. As per as my knowladge permission is consider for database related Object's Field.

 

So i am looking for approriate answer to this forum.

 

Thanks

R.K