You need to sign in to do that
Don't have an account?
Cherry@appshark
To update a field
How to update a field when the user clicks on a custom button?
I tried in java script, but cant sort it out.
Please help me ...........
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
How to update a field when the user clicks on a custom button?
I tried in java script, but cant sort it out.
Please help me ...........
As per my understanding, below is the answer
I hope you might be using apex:commandButton or a normal html button using input tag
If you use apex:commandButton, you have to use the action attribute there.
<apex:commandButton action="{!updateFunc}" value="Update"/>
Now, this updateFunc should be defined in your custom controller, something like this
public PageReference updateFunc()
{
//your update code here
return null;
}
If you are using <input type="button" form of tag, then the code should be something as below,
<input type="button" name="update" value="Update" onclick="return updateFuntion();"/>
Now you have to use actionFunction tag
<apex:actionFunction name="updateFunction" action="{!updateFunc}" rerender="Ids If Any"/>
In the above tag, name should be same that i used in onclick of input tag.
In Controller you should declare your action
public PageReference updateFunc()
{
//your update code here
return null;
}
Let me know if you have any issues.
All Answers
As per my understanding, below is the answer
I hope you might be using apex:commandButton or a normal html button using input tag
If you use apex:commandButton, you have to use the action attribute there.
<apex:commandButton action="{!updateFunc}" value="Update"/>
Now, this updateFunc should be defined in your custom controller, something like this
public PageReference updateFunc()
{
//your update code here
return null;
}
If you are using <input type="button" form of tag, then the code should be something as below,
<input type="button" name="update" value="Update" onclick="return updateFuntion();"/>
Now you have to use actionFunction tag
<apex:actionFunction name="updateFunction" action="{!updateFunc}" rerender="Ids If Any"/>
In the above tag, name should be same that i used in onclick of input tag.
In Controller you should declare your action
public PageReference updateFunc()
{
//your update code here
return null;
}
Let me know if you have any issues.
Can we do it through customisation?