Replacement for 'IF ISCLEAR(NewChildNode) THEN' in NF 2.60?

Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
edited 2008-01-27 in Navision Financials
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;
?
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)

Comments

  • ara3nara3n Member Posts: 9,256
    The way I can think this can be done is to have a COM object that you would pass the NewChildNode and in COM object you could do the check and see.

    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.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    The VAT update is a legal requirement and Microsoft only offers a fob-file for the last supported NAV versions. Therefore, we need to downgrade this fix to all lower versions.

    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 ;-)
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    What about a technical upgrade using the 5.0 executables? This way the client can also run Vista and SQL2005.

    Off-course they need to be on the enhancement plan to do this.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    With last option, I already meant to do a technical upgrade.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Oops. Sorry. :oops:

    Good luck anyway.
Sign In or Register to comment.