HOW TO test if a DateFormula variable is empty

We can learn a lot reading Microsoft standard C/AL code.

HOW TO test if a DateFormula variable is empty?

An example is offered in the Table 5088 Profile Questionnaire Line

TESTFIELD("Starting Date Formula",ZeroDateFormula);

Solution:
Create a Global Variable named like ZeroDateFormula of DataType DateFormula and don’t assign any value to it.

Now you can use this variable to test if a DateFormula variable is empty.

IF PeriodLength = ZeroDateFormula THEN
  ERROR(Text001); 

Did my HOW TO help you? Leave a reply.

Exception from HRESULT 0x800AC472

Microsoft Dynamics NAV
—————————

Exception from HRESULT: 0x800AC472
—————————
OK
—————————

Exception from HRESULT 0x800AC472

Exception from HRESULT 0x800AC472

Solution:
Activate Microsoft Office Excel inserting the Product Key then close and reopen it.

Did my solution solve your problem? Leave a comment.

TableData does not exist

—————————
Microsoft Dynamics NAV Development Environment
—————————
TableData 404 does not exist.
—————————
OK
—————————

TableData 404 does not exist

TableData does not exist

Cause:
You are trying to import from a fob file an existing table in which was changed the value of the property DataPerCompany.

Solution:

  1. delete the Table with number as from the error message (in my case it was 404)
  2. import the object

Related Post: TableData 2000000001 does not exist.

Did my solution solve your problem? Leave a comment.

Method not found

Microsoft Dynamics NAV
—————————

Method ‘Page43.a60Action123a62_a45_OnAction’ not found.
—————————
OK
—————————

Method not found

Method not found

Solution:

  1. open in Design the Page as from the error message (in my case it was Page 43)
  2. press Ctrl+Alt+F4 or go in View -> Page Actions
  3. delete the value from the column “Name” (in my case it was Release)
  4. exit and save the object

Tips & Tricks: To find what is the action the error message is referring, in the message, after the word “Action” there is the value of the ID property (in my case it was 123)

Did my solution solve your problem? Leave a reply.

Root element is missing

Microsoft Dynamics NAV
—————————

This message is for C/AL programmers: A call to System.Xml.XmlDocument.Load failed with this message: Root element is missing.
—————————
OK
—————————

This message is for C/AL programmers: A call to System.Xml.XmlDocument.Load failed with this message: Root element is missing

Solution 1:
Verify that each tag has the corresponding closing tag

Solution 2:
Make sure that the stream Position is set to 0 (zero) before to load the Stream

IF stream.Position > 0 THEN
  stream.Position := 0;

Did my solution solve your problem? Leave a reply.

You cannot create an Automation object on Microsoft Dynamics NAV Server. You must create it on a client computer.

—————————
Microsoft Dynamics NAV Development Environment
—————————
You cannot create an Automation object “AutomationVariable” on Microsoft Dynamics NAV Server. You must create it on a client computer.

—————————
OK
—————————

You cannot create an Automation object {AutomationVariable} on Microsoft Dynamics NAV Server. You must create it on a client computer

Solution:
Replace

CREATE(AutomationVariable)

with

CREATE(AutomationVariable,FALSE,TRUE)

Did my solution solve your problem? Leave a reply.

Streams cannot be used with client-side invoked automation objects

Microsoft Dynamics NAV
—————————

Streams cannot be used with client-side invoked automation objects.
—————————
OK
—————————

Streams cannot be used with client-side invoked automation objects

Solution:
Use DotNET DataTypes instead of Automation.

For example:
An Automation Subtype ‘Microsoft XML, v6.0′.DOMDocument can be changed with
a DotNet Subtype System.Xml.XmlDocument

Did my solution solve your problem? Leave a reply.