Object reference not set to an instance of an object.

internship01
Member Posts: 6
Hi everybody,
i'm facing the following error while publishing an app in VS Code:
The request for path /***/dev/apps?SchemaUpdateMode=forcesync&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: Object reference not set to an instance of an object.
The error comes up when i use Enum variable, for example:
EnumVar := EnumVar::Value1;
Do you have any suggestion?
Thanks
i'm facing the following error while publishing an app in VS Code:
The request for path /***/dev/apps?SchemaUpdateMode=forcesync&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: Object reference not set to an instance of an object.
The error comes up when i use Enum variable, for example:
EnumVar := EnumVar::Value1;
Do you have any suggestion?
Thanks
0
Answers
-
Have you downloaded symbols?
Is this from a dependency?0 -
Yes to both.0
-
I would check if all the dependencies are installed properly - I had this exact issue last week
My "name" variable under dependencies in app.json was not equal to the installed extension.
I had to re-install the proper extension, and then download symbols again0 -
In a nutshell it means.. You are trying to access an object without instantiating it.. You might need to use the "new" keyword to instantiate it first i.e create an instance of it. An Object is an instance of a Class , it is stored some where in memory. A reference is what is used to describe the pointer to the memory location where the Object resides. The message "object reference not set to an instance of an object" means that you are referring to an object the does not exist or was deleted or cleaned up. It's usually better to avoid a NullReferenceException than to handle it after it occurs. To prevent the error, objects that could be null should be tested for null before being used.
if (mClass != null)
{
// Go ahead and use mClass
mClass.property = ...
}
else
{
// Attempting to use mClass here will result in NullReferenceException
}
0 -
-
Thanks for the answers, at the the end the problem was due to an Enum extentesion, maybe a problem of BC14.0
-
What was the problem? You have an enum extension that wasn't recognized or something?0
-
It gave me the error in the question when I tried to publish, if I use the extended enum:
EnumVar := EnumVar::Value1;
Probably it was a bug of BC14.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions