You need to sign in to do that
Don't have an account?
LaurensB
Set value for a field in VF page
Hi,
I created a button that calls a VF page with 2 fields on it:
- Closure Code
- Resolution
But I want to set the field Status to 'Closed' without displaying it on the VF page or that a user needs to select it themselves.
How does one do that? Can I do that straight in the VF page? I certainly hope so :-)
Any help on this appreciated.
There are several ways you could accomplish this, but one of the easiest is to simply show the Status field, but only include one option that is defaulted on the page and the user won't be able to modify the choice in the dropdown. Obviously remember to replace the "object" with your proper object name.
Hope this helps!
All Answers
There are several ways you could accomplish this, but one of the easiest is to simply show the Status field, but only include one option that is defaulted on the page and the user won't be able to modify the choice in the dropdown. Obviously remember to replace the "object" with your proper object name.
Hope this helps!
That worked very well. Is there anyway I can hide the selectlist. I have set it to disabled now but I would prefer to hide it. I tried rendered="false" but that does not work it ignores the field then.
Thank you in advance.
Yes, there is - simply modify the style attribute of the selectlist element:
The complete code would then be something like:
I just tested this and it works great.
Hope this helps!
Again brilliant, but anyway to hide the label?