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
Aam MAam M 

I want to populate value in Number field when I select some picklist

Please have a look into the picture, I want to populate value in the Amount field when I select picklist value as Per Diem, and that amount should be fetched from Policy object Per diem field, this per diem field value should be shown in that Expense Line Item's Amount field..

How can I get this???
User-added image
User-added image

Help needed!!

pradeep kumar yadavpradeep kumar yadav
You can make some changes in VF page as this....
<apex:page >
                <apex:selectList onchange="FN()">
                    <apex:selectOptions value="Options"/>
                <apex:actionFunction name="FN" action="{!method_To_Add_Value_In_Amount_From_Policy}" reRender="op"/>
            	<apex:outputPanel id="op">
                	<apex:inputText label="Amount"/>

pradeep kumar yadavpradeep kumar yadav
Initialize Expese Head in Constructor of Controller.

Make a method name like 'method_To_Add_Value_In_Amount_From_Policy' and check ...

if(Expese Head  == 'Per Diem'){

Amount = .......;