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
mohd atifmohd atif 

How do i get appropriate value on screen by selecting anther value before clicking save button

For example,there is a text field like total marks,secured marks and percentage.
if i enter total marks =1000, and secured marks=781 and it automatical generate the field like 78.1% in percentage field.
we are able to do this after clicking on save button,but i wanna do this on screen an user can see it,when he clicks a tab button...

do u got it what i am saying.......??

dev401hasdev401has

Formula field are seen only on view side of page and not on edit page hence formula field wil not solve your problem.

 

You will have to use Javascript which will do the calculation for you and get you the solution.

 

Prepare a visualforce page. On some event like mouseup or keyUp or onBlur on the field of secured marks, call the javascript function which will do the calculations and set the value for you in your field Percentage.

 

I blv formula field will be the best option and the final view you will be taking on detail/view page only and it will be easy to implememt.

Vinay BhatiaVinay Bhatia

You can use javascript into VF page for on change event function. This is the only option you had. In standard page, you cannot do it on editing level.