DelayedInsert=NO in subform

JedrzejTJedrzejT Member Posts: 267
Hello

Here is my problem.

DelayedInsert in subform must be NO;
When Card start focus is in subform.
How avoid this problem?

Thanks

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Have you tried putting something in the activecontrolonopen property?
  • kinekine Member Posts: 12,562
    How to avoid this? Set the delayedinsert=yes and solve the problem, why you need to have it no... :-) may be it will be easier...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • JedrzejTJedrzejT Member Posts: 267
    Thanks for reply

    I need to know "Line No." when I validate(in table) other field in the same record (which already not exist because i don't leave the record)

    I solve this temporary with:
    DelayedInsert:=No;

    OnOpen
    MyVar:=1;

    OnTimer

    If MyVar=1 THEN
    "No.".Activate;
    MyVar:=0;
  • kinekine Member Posts: 12,562
    If you need to insert some values into realted table which is connected through Line No., you can do it like Dimension management on sales line. You can select Dimension in Shortcut dimension 1 on the line when you do not know the line no. It is saved in temporary table in the Dim. management codeunit, and in OnInsert the temporary record is saved into permanent table...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,118
    You best use DelayedInsert=Yes.
    In the field where you need to know the Line No, in the OnAfterValidate-trigger of the field in the form, you have to put "Currform.SAVERECORD". This function will insert or modify (the function knows what it has the do) the record and you have "Line No.".
    Negative is that all the code you need has to be put in the form, because the table-onvalidate triggers first.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.