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.

Microsoft Download Center Download button is missing

You want download a file or software from Microsoft Download Center.

In the Install Instructions section is written:

Download the appropriate file for your computer's processor by clicking one of the links below. You can run the package directly from the link or you can also save it on your local disk to install later.

But you cannot see any link or Download button.

Microsoft Download Center Download button is missing

Solution:
Change the URL of the page using https:// rather than http://

Did my solution solve your problem? Leave a comment.

Failed to write session data

Warning: Unknown: open(/home/content/123456/123456/tmp/sess_abc123456abc123456, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0

Cause:
In my case these warnings appeared after I migrate my website in GoDaddy.

Solution:
Contact the support of your provider and ask to create the folder

/home/content/123456/123456/tmp

as from the error message (I inserted 123456 for example, in you case number will be different).

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.