function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
FreytagFreytag 

Workflow - Update Select List - How to?

Ho everybody,

 

Is there anyway - except with APEX - to update a select list?

 

I know that SF natuarly doenst support this - Buy maybe you know a workaround.

 

Best regards,

Philipp

prageethprageeth

Hello Freytag;

What do you mean by  "update a select list"..???

If you want to add more options to the list you can do it by using a javascript.  However if you expect something different pls try to explain further. 

 

<apex:page controller="MyController">

<script>

function insert(selectListId) {

var selectList = document.getElementById(selectListId);

var newOption = document.createElement('option');

newOption.text = 'NewCountry';

newOption.value = 'NewCountry';

selectList.add(newOption);

}

</script>

<apex:form>

<apex:selectList size="1" id="myList">

<apex:selectOptions value="{!items}"></apex:selectOptions>

</apex:selectList>

<apex:commandButton value="Add" onclick="insert('{!$component.myList}');return false;"/>

</apex:form>

</apex:page> 

 

FreytagFreytag

Hey Prageeth,

 

thanks for your time!

 

By "update a select list" i mean to change the value of it with a field update function.

The functions which are triggered by a workflow-rule.

 

Right now i cant only select a value above/ bellow or directly define a value. 

But a can not let a formula select a value <- This is what i would need.

アン グエン 5アン グエン 5
Hi,
I also meet @Freytag's problem
Anybody can answer that question?