Ability to add new records to different tables from one card

ales'ka
Member Posts: 4
Hi to all!
I have such problem:
I have Employee card and some buttons on it. Structure:
employee card ->
Button1. contact -> contact list(show all conacts of selected employee in list) -> contact card
Button2. education -> seducation list(show all educations of selected employee in list) -> education card
Contact card and education card also have such buttons like add new, save and delete. And if employee has contact(education) I have no problems wiht adding new contact (education) to him. But if employee have no contact(education) - it is a problem, because I have no ability to see contact (education) card.
I created on employee card Button add new contact. I used Insert line with such parameters
1.type = insert line
2.target table no. = 10003 (contact table)
3.show in mode = edit
4.HTML layout = button
5.position = 60000
6.restrict to editable = true
I wrote new function in codeunit 6823 EP Insert Line Data Mgt. It was successful to create new contact for selected person.
But there were some defects: function GetTableNoFromStatic in codeunit 6813 (EP Decode XML) returned number of employee table, but not contact table! It means that from my employee card I can add only smth one - contact or education.
I thied to get position of current request, writing in codeunit EP Decode XML such code
GetPositionFromStatic(VAR position : Integer;VAR XMLDocStatic : Automation "'Microsoft XML, v3.0'.DOMDocument")
XMLNode := XMLDocStatic.documentElement;
position := 0;
WITH XMLDOMMgt DO BEGIN
IF FindNode(XMLNode,'POSITION',XMLNodeFound) THEN
IF STRLEN(XMLNodeFound.text) > 0 THEN
TableNo := FormatFunctions.TextToInteger(XMLNodeFound.text);
END;
But my function returned null every time.
I don't know, why function GetTableNoFromStatic returns number of current table, but not target table. Accoding to the function CreateLayout in codeunit 6814 EP Encode XML tag TABLE_NO have to return the number of target table. But I didn't find possibility to show the structure of XML due to date between navision and sharepoint are transmitted.
](*,)
Please, help me find any solution.
I have such problem:
I have Employee card and some buttons on it. Structure:
employee card ->
Button1. contact -> contact list(show all conacts of selected employee in list) -> contact card
Button2. education -> seducation list(show all educations of selected employee in list) -> education card
Contact card and education card also have such buttons like add new, save and delete. And if employee has contact(education) I have no problems wiht adding new contact (education) to him. But if employee have no contact(education) - it is a problem, because I have no ability to see contact (education) card.
I created on employee card Button add new contact. I used Insert line with such parameters
1.type = insert line
2.target table no. = 10003 (contact table)
3.show in mode = edit
4.HTML layout = button
5.position = 60000
6.restrict to editable = true
I wrote new function in codeunit 6823 EP Insert Line Data Mgt. It was successful to create new contact for selected person.
But there were some defects: function GetTableNoFromStatic in codeunit 6813 (EP Decode XML) returned number of employee table, but not contact table! It means that from my employee card I can add only smth one - contact or education.
I thied to get position of current request, writing in codeunit EP Decode XML such code
GetPositionFromStatic(VAR position : Integer;VAR XMLDocStatic : Automation "'Microsoft XML, v3.0'.DOMDocument")
XMLNode := XMLDocStatic.documentElement;
position := 0;
WITH XMLDOMMgt DO BEGIN
IF FindNode(XMLNode,'POSITION',XMLNodeFound) THEN
IF STRLEN(XMLNodeFound.text) > 0 THEN
TableNo := FormatFunctions.TextToInteger(XMLNodeFound.text);
END;
But my function returned null every time.

I don't know, why function GetTableNoFromStatic returns number of current table, but not target table. Accoding to the function CreateLayout in codeunit 6814 EP Encode XML tag TABLE_NO have to return the number of target table. But I didn't find possibility to show the structure of XML due to date between navision and sharepoint are transmitted.
](*,)
Please, help me find any solution.
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