Options

How to update the header when something changes in line ?

chandrurecchandrurec Member Posts: 560
Hi all,

I have a field named Our ref in sales header . When I change the Item No in Sales Line (I.e Subform) , I am resetting Our ref field to null value. But only when I click this field in header the reset is getting affected else its not getting getting affected. So How to make the our ref automatically getting affected when Item No is changed in sales line without manually clicking the our ref field in sales header to refresh.

Thanks in advance.

Regards,
chandru.

Comments

  • Options
    MarkHamblinMarkHamblin Member Posts: 118
    Here's a trick you can use in the classic client (not in RTC).
    1. Create a global variable for a NAV timer object in the main (header) form. Set the interval to 1 (ms) and the state to disabled.
    2. In the timer object's timer event, refresh the form and set the state to disabled.
    3. Add a function to the subform that takes the timer as a parameter - store this timer object in a global variable. Call this function from the main form and pass its timer object to the subform.
    4. Whenever something changes in the subform, set the timer state to enabled - this will trigger the event in the main form, where the form gets refreshed and the timer gets disabled until the next change.

    - Mark
  • Options
    chandrurecchandrurec Member Posts: 560
    Hi Mark,

    I got it. Thank you.

    Regards,
    chandru.
Sign In or Register to comment.