1

Your code basically works - one issue might be the way in which you are selecting the input element. If anything changes on the page the id - "j_id0:j_id2:j_id4:j_id31:j_id34:j_id35", will also change since this describes the elements position in relation to other page elements. Personally I normally solve this by explicitly adding an id: <apex:...


1

You don't need to query the records, just bind directly to the record in the controller: <apex:page standardController="Opportunity" extensions="Opportunity_UpdExt" docType="html-5.0" sidebar="true" lightningstylesheets="true"> <apex:form> <apex:pageBlock> <apex:...


1

Inside Constructor, A local variable is declared with the same name as an instance variable. Instead, directly populate the instance variable. It fixed my issue.


Only top voted, non community-wiki answers of a minimum length are eligible