Linking forms from forms

david.weeksdavid.weeks Member Posts: 96
edited 2004-04-20 in Navision Attain
Hello All,

Having a very bad morning as I cannot get something very simple to work. I have setup a new command button on a form and set the properties to run object and also created the relevant link. When I click on this, the correct form loads as do any existing entries for that customer for example. However, I am only able to modify the record that is on the screen and not allowed to add any new records although via my OnInsert, I am generating records with the primary key value only.

In actual terms, when i try to move to the next line in the grid of my form, the cursor goes to the primary key field and does nothing else. (except increment the primary key value in the table that the form is based on). I am not allowed to move into other fields...

Any ideas?

Thanks

Comments

  • kinekine Member Posts: 12,562
    If you have DelayedInsert enabled, you can enter other fields after you fill primary key - may be this is the problem.

    Primary key is automaticaly filled, if the form is filtered to some value in this field (not range of values or something other). Can you add details about primary key of the table and which fields are linked to table, from which you are opening this form?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • david.weeksdavid.weeks Member Posts: 96
    Hi Kine,

    Thanks alot, that did the trick. I had the delayedinsert set to NO.

    However, I have one field on my new form that is a date field and I want this to look up the start date field in the accounting table. I have tried to do this in the usual way via the property for the field in the table, but the lookup option is not available, this only acts as a validation..any ideas? I have the salesperson code table to act as a look up successfully ??

    Also, how do I automatically populate the salesperson field on my new form, from the previous form (from where I press the button to open the new form).

    Thanks again
  • david.weeksdavid.weeks Member Posts: 96
    Hi Kine,

    Thanks alot, that did the trick. I had the delayedinsert set to NO.

    However, I have one field on my new form that is a date field and I want this to look up the start date field in the accounting table. I have tried to do this in the usual way via the property for the field in the table, but the lookup option is not available, this only acts as a validation..any ideas? I have the salesperson code table to act as a look up successfully ??

    Also, how do I automatically populate the salesperson field on my new form, from the previous form (from where I press the button to open the new form).

    Thanks again
  • david.weeksdavid.weeks Member Posts: 96
    Hi Kine,

    Thanks alot, that did the trick. I had the delayedinsert set to NO.

    However, I have one field on my new form that is a date field and I want this to look up the start date field in the accounting table. I have tried to do this in the usual way via the property for the field in the table, but the lookup option is not available, this only acts as a validation..any ideas? I have the salesperson code table to act as a look up successfully ??

    Also, how do I automatically populate the salesperson field on my new form, from the previous form (from where I press the button to open the new form).

    Thanks again
  • kinekine Member Posts: 12,562
    There is no standard lookup form for table Date. You must create some and programm OnLookup trigger.

    SalesPerson - add filter on this when calling the form, in the form add into OnNewRecord :
    SalesPerson := GetFilter(SalesPerson);
    
    or something similar (you must filter to one value).....
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.