Form

Navi_LearnerNavi_Learner Member Posts: 356
I created a new form based on a new table. Every time when I entered the Item No, system will pop up saying 'DO YOU WANT TO RENAME THE RECORD' until I click YES, the system will let me go. Does it affect the whole database if later on we enter more data in the table. Do we have to set up something when we build a new table? Can anyone tell me what's wrong with it? Thanks in advance!

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    You probably added the itemno to the primairy key. If this is nessesairy you can add the option delayed insert to your form.

    If other tables in navision are not related to this table renaming it not a problem.
  • Navi_LearnerNavi_Learner Member Posts: 356
    Thank you, Mark! Would you please tell me in detail what's option delay. How to do add it in the form? Since we don't have liscene to do trigger programming, is it possibel to add option delay in the form? Thanks!
  • ara3nara3n Member Posts: 9,257
    if you design the form, go to properties, find the property DelayedInsert, set that true.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Navi_LearnerNavi_Learner Member Posts: 356
    Thank you so much! It works! But I have another question. I created a new subform and put it in the Order form. I also linked main form with subform. The problem is when the cursor is in any field of the subform, the system pops us 'THE ITEM LINE ALREADY EXISTS IDENTIFICATION FIELDS AND VALUES ITEM NO:" . Another problem is that the first field in the subform is drop down list ,whenever I input the data, the system automatically jumps to the second line and pops up the same error message. Thanks in advance!
  • ara3nara3n Member Posts: 9,257
    You welcome. You need to set AutoSplitKey for the form that opens in the subform. Set that to yes and it will select the next line no., which I'm assuming is of type integer.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Navi_LearnerNavi_Learner Member Posts: 356
    Thanks! Why the system pops up the error message whenever the cursor is in the empty field? I can't go anywhere.
  • Navi_LearnerNavi_Learner Member Posts: 356
    Thanks! Why the system pops up the error message whenever the cursor is in the empty field? I can't go anywhere.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    To use the autosplitkey functionality you need to add some kind of line noumber to your key. This needs to be the last field in the key definition.

    Please have a look at the development training material about creating this kind of solutions. it is all explained there how to do these kind of things.

    (Or just use this furum till it works. :wink: )
  • Navi_LearnerNavi_Learner Member Posts: 356
    Since we have one to many relationship, but when I enter the sales line, the system keeps telling the Order No. already exsits. Is there any way to set up something in the system?
  • Navi_LearnerNavi_Learner Member Posts: 356
    Thank you! I read the document, but I still have the problem. You expert opinion is very helpful. Here is my problem. I create a Return order table with some fields in which Return No is Primary key and I create another table Return Order Line which includes Return Type(Option: Return from the customer, Shipout to the customer), Return Date, Item No, Item Quantity and RA number(it links with RA number in the Return order table) and the primary key is Item No. I create a main form and subform(return Order Line) in which I hide the RA number. When I complete the first line(Return from the customer to the Item Quantity) and move to the second line(Shipout to the customer to the end), the system pops up saying the item no already exist, even though the item no is not duplicate. DO I set the wrong primary key? Since it is very urgent, can anyone advise? Thank you so much!
  • krikikriki Member, Moderator Posts: 9,118
    Thank you! I read the document, but I still have the problem. You expert opinion is very helpful. Here is my problem. I create a Return order table with some fields in which Return No is Primary key and I create another table Return Order Line which includes Return Type(Option: Return from the customer, Shipout to the customer), Return Date, Item No, Item Quantity and RA number(it links with RA number in the Return order table) and the primary key is Item No. I create a main form and subform(return Order Line) in which I hide the RA number. When I complete the first line(Return from the customer to the Item Quantity) and move to the second line(Shipout to the customer to the end), the system pops up saying the item no already exist, even though the item no is not duplicate. DO I set the wrong primary key? Since it is very urgent, can anyone advise? Thank you so much!
    This is because your primary key is "Item No.". For Navision, the primary key must be unique. I think it would be better to make ""Return No.","Line no." as primary key. The first field to link it to the document. The second for using the autosplitkey-property.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Navi_LearnerNavi_Learner Member Posts: 356
    Thank you! Do I need to set autosplitkey to Yes in the Return Line property?
  • Navi_LearnerNavi_Learner Member Posts: 356
    Now it works, but there is a problem is the subform. After I enter the second row in the subform, all the data are gone, evev though I can find them in the tabel. We just see the first line( Returned information). Is there any way for us to view the data in the form? Thank you so much!
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    What is your tableview? There is probably some filter in the view that is not in the records you enter in the table.
  • Navi_LearnerNavi_Learner Member Posts: 356
    Just now I test the data and it worked. But after I deleted the data from the tabel, error pops up again saying the line no already exsits and it is really frustrating. Since the line no is unique, why it still doesn't work
  • Navi_LearnerNavi_Learner Member Posts: 356
    :D OK I figured it out and it works perfectly. Thank you for all the expert who help me!!!
Sign In or Register to comment.