Display new record problem

Kalianna
Member Posts: 5
Hi everyone,
I was wandering if there is a way to manage this situation:
I have a form on table A. From this form there is a function that calls another form in which the user can input data in order to insert a new record in table A.
There is a way to close the second form and display automatically in the first form the record just inserted?
For now I only have managed to obtain this without close the input form, but so three forms remains open.. ](*,)
Any idea?
thanks in advance!
I was wandering if there is a way to manage this situation:
I have a form on table A. From this form there is a function that calls another form in which the user can input data in order to insert a new record in table A.
There is a way to close the second form and display automatically in the first form the record just inserted?
For now I only have managed to obtain this without close the input form, but so three forms remains open.. ](*,)
Any idea?
thanks in advance!
0
Comments
-
thanyou, but maybe I wasn't cleare in the explanation.
the problem isn't close the form B, but have the new record inserted displayed in form A after close the form B.
imagine to call a function from Customer Form in order to create a clone of the current customer but with some changes. In form B I ask the fields that have to be changed. Clicking ok I close the form B but in Customer Form remanins the old record.0 -
Ok, now i think i understood. You're talking about a card form, not a list form. It's a totally different story...
-you open the form based on tabl A (let's say the customer form), and you're currently on record X0001
-you run your form B from here and then compile some fields and hit a button to confirm (customer X0010 is created)
-you get back to customer form (and you are still on the record X0001)
Now the question is: what do you need to do to change the pointer to the record on the card page? GET the value of the pk of the record you have just created0 -
Maybe you should do a currform.update(false) on the first form when you return from the second ?0
-
So far I tried both the setrecord and the settableview (after get on the correct record of course) on the form, but nothing..
update(false) gives me an error in closing the second form0 -
you're obviously missing something: GET must work if you call it in the right way.
your code (under the button that runs the function) should be like this:myform.myfunction; // optional myform.RUNMODAL; // runmodal is important. if you use run, check the online help to see what's the difference between RUN and RUNMODAL mynewcustomer := myform.getcreatedcustomer; //this function returns the customer code that your form B has created GET(mynewcustomer);
0 -
solved, I was trying to get the record from the second form instead than from the first :oops:
thanks!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions