cancel
Showing results for 
Search instead for 
Did you mean: 

Z table fields issue

former_member198132
Active Participant
0 Kudos
88

  Hi all,

I have added a view for z table update in opportunity. It is like one assignment block .

Here I have 2 amount fields like  Cost1 and Cost2 , when we enter the data into these 2 fields , I am calculating the margin data into 3rd field 'MARGIN'.

Cost1 - cost2 = Margin

200  - 100  = 100.

Now issue is, when I enter the data Cost1 and Cost2, with out pressing ENTER key, Margin value is not updating when we click directly on SAVE button ( working when user click on ENTER) .

Please help me in this ? Do need to refresh  the view  when we click on SAVE button .

Note : I have added Z table as assignment block.

Already i tried the PUBLISH_CURRENT method etc...

Regards,

ram

Accepted Solutions (1)

Accepted Solutions (1)

sumeet_gehlot
Contributor
0 Kudos

Where you have written the code to calculate the margin ???

Use Do_prepare_output.

Regards,

Sumeet

former_member198132
Active Participant
0 Kudos

I am writing the calculation part into GET_MARGIN method.

not in DO_PREPARE_OUT.

regars,ram

faisal_pc
Active Contributor
0 Kudos

Hi Ram,

Write the code in do_prepare_output and see.

Thanks,

Faisal

former_member198132
Active Participant
0 Kudos

Hi Faisal, already I did that now . not working !!

When I click on SAVE , it is not coming into Do_PREPARE_OUTPUT.

regards,

ram

faisal_pc
Active Contributor
0 Kudos

Hi Ram,

Can we go in the following way?.

In save button event, since the margin field is an auto populated one, save the value by field 1 and field 2 irrespective of user has pressed on enter or not. For seeing the values on the screen for users, let the code in do_prepare_output be there.

Thanks,

Faisal

former_member198132
Active Participant
0 Kudos

Writing the code in DO_VALIDATE_INPUT  method. I think it is going to solve my problem.

thanks Faisal and summet

regards,

ram

faisal_pc
Active Contributor
0 Kudos

Hi Ram,

But do_validate_input is not the place to write the code for this purpose. Anyway, try that.

Thanks,

Faisal

former_member198132
Active Participant
0 Kudos

Resolved writing the code in DO_VALIDATE_INPUT.

regards,

ram

Answers (1)

Answers (1)

faisal_pc
Active Contributor
0 Kudos

Hi Ram,

If I understood you correctly, you have 3 fields and the third field is based on first two fields. Right?. And the third field is getting populated when user presses enter button.

Here, I would like to know where you have written the code to populate the third field?. In OnEnter event by calling set method?.

You can do the same action in save also if in case user hasn't pressed on enter button. Right?.

Thanks,

Faisal