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
dhanamjaya damaragunta 24dhanamjaya damaragunta 24 

how to get updated controller values in Java script

Hi All,
I have a scenario,I am calling controller method from JS using action function upon clicking the command button like below

<apex:commandButton value="Submit"
rendered="{!showSubmitButton}" onclick="savePartsOrderRecords();" reRender="partsOrderForm" />
Action funtion: <apex:actionFunction action="{!saveRecords}" name="savePartsOrder"/>

JS code:function savePartsOrderRecords(){

if(validateOrderParts() && validatePartsOrderTotal()){

In my controller i am updating one picklist value named as Status.if I try to get the status by using '{!objname.status__c}' in JS code (alert line)after savePartsOrder() its not giving updated value
Miles Smith 5Miles Smith 5
for me, this thread solution worked​
with regards
shareit (  UC browser (   MX player (