I'm downgrading some C/AL Code, with regards to a VAT Update, to lower NAV versions.
Part of the original code is:
NewChildNode := XMLNode.ownerDocument.createNode('element', NodeName, NameSpace);
IF ISCLEAR(NewChildNode) THEN BEGIN
ExitStatus := 1;
EXIT;
END;
My problem is that the ISCLEAR instruction is not available in Navision Financials 2.60. So how should I replace the part
IF ISCLEAR(NewChildNode) THEN BEGIN
ExitStatus := 1;
EXIT;
END;
?
Comments
The other option I can think of is to create a CU with function that you would pass the NewChildNode
Something like this
MyCodeUnit.setNode(NewChildNode);
If MyCodeUnit.RUN then begin
exitstatus := 1
exit;
end;
In the MyCodeUnit you could
OnRun
Mytext := NewChildNode.Text;
If NewChildNode is not instantiated you'll get run time error, which if MyCodeUnit.run will catch.
The other option that you could try is in CU is to do
If Create(NewChildNode) then
something.
Last option is to do exe upgrade.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
As your solution requires or a COM object which needs to be installed at every installation, or it requires a new codeunit which needs to be accessible in the customers license files, I think I'll go for the last option ;-)
Off-course they need to be on the enhancement plan to do this.
Good luck anyway.