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.