You need to sign in to do that
Don't have an account?

Change the Picklist values when we click a link or button?
I want to change the pick list value (Open,Inprogress,Hold,Complete) the default value is open . when i click a button or link ask one meaasge are you sure want to complete? Y/N, click Y means, the picklist value to change (open to complete), also enable the check box is true.?
Any suggestion is helpful..
Hi,
if you do this in a custom VF page then you can use onclick java script to confirm the request and then perform the action and set the picklist value to 'Complete' and set true in checkbox like:
<apex:commandbutton value="Complete" action="{!doComplete}" onclick="return doConfirm();"/>
<script>
function doConfirm() {
var r=confirm("are you sure want to complete? Y/N");
if (r==true) {
return true;
} else {
return false;
}
}
</script>
And in Apex.
public void doComplete() {
//set the value here.
}
please let me know if u have any problem on same and if this post helps u plz give KUDOS by click on star at left.
Thanks!
Send what type of value pasted in the apex controller.? I got a error. When i click the popup window ok , the status field is update open to complete, also one check box complete is true?
Listcontrol Compile Error: Variable does not exist: Status__c at line 9 column 17
public void doComplete()
{
if(Status__c == 'Open')
{
return Status__c = 'Complete';
}
else
{
return Question_Set__c = true;
}
//return null;
}
}