How update Subform Controls

sanjeevdalelasanjeevdalela Member Posts: 45
Dear friends,

I Inserted Some Entries in Line Table on Header Form one Control Validate
and call Currform.UpdateControls

But my Inserted Entries Not Show.

When I click in sub Form & Mouse Scroll then my Entries Comes

So Please give me solution for Sub Form update. ](*,)
Sanjeev Kumar Dalela
Technical Consultant
(Dataman Computer Systems P Ltd.)

Comments

  • BBlueBBlue Member Posts: 90
    You cand do a
    CurrForm.UPDATE(FALSE);
    

    in OnAfterValidate trigger of your form control.
    //Bogdan
  • lubostlubost Member Posts: 623
    You should create a function ( e.g. UpdateFromParent) in subform object with simple command Currform.UPDTAECONTROLS and call this function from trigger from main form via named subform control (e.g. SubForm.UpdateFromParent).
  • JanireJanire Member Posts: 31
    Hi, I have exactly the same question. Please, help me!!!
    I have proved with a new function (the 2nd solution) but it doesn´t work.
    Thank's!
  • garakgarak Member Posts: 3,263
    Here a very simple example:

    Take a look in Form 42 (Sales Order). There is the Subform with the name SalesLines (Object 46 Sales Order Subform).
    In the Form 46 there is a Function like UpdateForm(). These function are called from the Mainform (Form 42) like following:
    CurrForm.SalesLines.UpdateForm(Paramater);
    

    CurrForm is the Current Form from where you come (here form 42)
    SalesLines is the name of the subform in form 42. To call a funtion in a subform, the subform must have a name (Property)
    UpdateForm is a function in form 46 (the subform).

    Regards
    Do you make it right, it works too!
  • JanireJanire Member Posts: 31
    Finally the problem was some Filters...but thank you!
    Anyway, could I update a form that is the father from his child form?
    Example:
    I have the f50000 with a textfield called "Nu" and a button called "make new product".
    If I push the button (from the f50000) the f50001 opens.
    I make a new product in the form f50001 and when I close it I see again f50000 (It never was closed). But I want that in the form f50000 appears in the textfield "Nu" the number of the new product.
    Both forms comes from T50000.
    :roll:
  • kinekine Member Posts: 12,562
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • JanireJanire Member Posts: 31
    Thank's a lot!!
Sign In or Register to comment.