Drill Down Problem

Hi Guys, I have problem about Drill Down. This is an example; I have develop a form that has drill down field, when I click the field than another form is open, and I input a value, let’s say “500”, then I click OK, the form is close, but this drill down field is still zero ( 0 ), it doesn’t refresh to 500, but when I go down to next row and up again, it can refresh to 500. My question is: can I make its automatically refresh to 500 and I don’t have too go down and up to make it refresh? Thank you very much

You can use the OnDrillDown trigger of the field to implement custom behaviour. Open the drill down form modally using C/AL code (don’t forget to set all the required filters etc.), and add a CurrForm.REFRESH afterwards. I don’t know if an explicit CALCFIELDS is also necessary.

there is no REFRESH command, did you mean UPDATE?

This drill down field is CALFIELD, so, can anyone help me?

quote:


Originally posted by murry
there is no REFRESH command, did you mean UPDATE?


Erm, yes. [:I]

quote:


Originally posted by murry
This drill down field is CALFIELD, so, can anyone help me?


What I meant with my CALCFIELDS statement was that it might be necessary to explicitly recalculate the field’s value after the DrillDown. If you add some values in the DrillDown form, Navision may not show the new value of the calculated field even after an UPDATE because the value needs to be calculated again. So, your OnDrillDown trigger of the calculated field might look like Entries.SETFILTER(…); // set all necessary filters FORM.RUNMODAL(xxx, Entries); // xxx is number of DrillDown form CALCFIELDS(theField); // this might be necessary or not… CurrForm.UPDATE(TRUE); Hope this helps,