+ Start a Discussion
David D.ax402David D.ax402 

Using a status field in custom objects

Hi all,

 

I have a custom object created and I have added a "Status Field" to it just like a case.  I need to have this field behave just like the status field in cases;

  1. I do not want "closed" to show up in the picklist
  2. I want to create a closed button that takes me to a close page and then allow the user to select "closed" status and ONLY that status.

This is how SF comes out of the box and I'd like to set it up on other objects.

 

Thanks for you help.

 

aalbertaalbert

You can accomplish this with a custom button, visualforce page, and apex.

1. Create and display the custom button to "Close". 

2. That button invokes a Visualforce page to let the user populate the Close page (reason, status, ect). 

3. When a user clicks "Save" or "Close" from that Visualforce page, it will invoke some apex (ie controller extension in this case), which can update the status to "Closed." 

 

Note - Don't specify Closed as a picklist value so users can't select it without using the Closed button. And the apex can then simply set the Status__c field = 'Closed' (even if it is not a defined picklist value...)