Problem with inserting through subform

tompynationtompynation Member Posts: 398
Hi,

I created a new TabPage on the Item Card, and added a new Subform on this tabpage...

In this subform there is a tablebox containing fields from a new Table:

Enabled Field No. Field Name Data Type Length Description
Yes 1 ID Integer
Yes 2 ItemCode Code 20
Yes 3 ChemischeGrondstof Text 50
Yes 4 PercentageTovItem Decimal
Yes 5 Omschrijving Text 50
Yes 6 Chemische Groep Text 1



Now in the properties of the subform i've added the subform link:
ItemCode=FIELD(No.)

This works fine cause i only see the correct lines in the subform

When i now press F3 in the subform to enter a new record,
The ItemCode should get filled in by the Item No from the Item card

But this is not working...

Is there anything else i have to setup before this ItemCode will get filled up with the ItemNumber from the Itemcard??

Answers

  • AlbertvhAlbertvh Member Posts: 516
    Hi
    What is the key of your new table ItemCode,Integer?
    You could use the delayedInsert property as in the Sales Order forms


    Albert
  • Sandeep_PrajapatiSandeep_Prajapati Member Posts: 151
    deleted
    Sandeep Prajapati
    Technical Consultant, MS Dynamics NAV
  • tompynationtompynation Member Posts: 398
    The ID field is an autoincrement field...

    These are my keys in the new Table:

    Enabled Key SumIndexFields
    Yes ID
    Yes ItemCode PercentageTovItem

    I'm already using the delayed insert, but the ItemCode is not getting filled up...

    Normally when pressing F3 the itemcode should get filled up immediatly
  • kinekine Member Posts: 12,562
    Hi,

    I created a new TabPage on the Item Card, and added a new Subform on this tabpage...

    In this subform there is a tablebox containing fields from a new Table:

    Enabled Field No. Field Name Data Type Length Description
    Yes 1 ID Integer
    Yes 2 ItemCode Code 20
    Yes 3 ChemischeGrondstof Text 50
    Yes 4 PercentageTovItem Decimal
    Yes 5 Omschrijving Text 50
    Yes 6 Chemische Groep Text 1



    Now in the properties of the subform i've added the subform link:
    ItemCode=FIELD(No.)

    This works fine cause i only see the correct lines in the subform

    When i now press F3 in the subform to enter a new record,
    The ItemCode should get filled in by the Item No from the Item card

    But this is not working...

    Is there anything else i have to setup before this ItemCode will get filled up with the ItemNumber from the Itemcard??

    This "Autofill" works only if the filtered field is part of primary key. Because you are using the ID as primary key, you need to set form property "PopulateAllFields" to autofill other fields that are not part of PK.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • tompynationtompynation Member Posts: 398
    Great the PopulateAllFields has done it \:D/

    Many thanks =D>
  • kinekine Member Posts: 12,562
    You are welcome... 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.