Choosing diff. forms from 1 button & displaying right da

zzz458
Member Posts: 11
Hi,
One of our customers have different product group codes and different properties for each group.
I have created different tables and forms for each product group to keep the properties of the items belonging to that group.
Now I want to place a button into the item card which will understand the group of the product and choose the necessary form and
then show the properties of that item. I have already done the first part. The button chooses the right form according to product group code but I can't make it display the datas of that item.
Can this be done? If yes, how?
Thanks a lot.
One of our customers have different product group codes and different properties for each group.
I have created different tables and forms for each product group to keep the properties of the items belonging to that group.
Now I want to place a button into the item card which will understand the group of the product and choose the necessary form and
then show the properties of that item. I have already done the first part. The button chooses the right form according to product group code but I can't make it display the datas of that item.
Can this be done? If yes, how?
Thanks a lot.
0
Comments
-
Hi,
If you have your form as a variable, you could do something like:SomeRec.SETRANGE(.....); aForm.SETTABLEVIEW(SomeRec); aForm.SETRECORD(SomeRec); aForm.RUN;
Or, if you have olny the id of the form:SomeRec.SETRANGE(.....); FORM.RUN(4711,SomeRec);
where SomeRec is a record variable that holds the properties of the specific group.0 -
A suggestion:
Add a field to your product group table that links to the object table, and give the user the ability to enter the form number there. That way you can use the number in that field to know what form to open.0 -
I agree with Alain.
For Lazy Programmers (Like me):
If you compileForm.runmodal(form::form1)
It will generateForm.runmodal(form::"Company Information")
Same goes for reports and dataports etc.0 -
For even more Lazy :-$ Programmers (Like me who copied the text from Mark):
If you compileForm.runmodal(form::"1")
It will generateForm.runmodal(form::"Company Information")
Same goes for reports and dataports etc.:D:D
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Same goes for optionstrings
SalesLine.Type := SalesLine.Type::"2";
MakesSalesLine.Type := SalesLine.Type::Item;
After compiling
I will post this to Tips and Tricks0
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