Avoiding Null reference as output value of extensions

Avoiding Null reference as output value of extensions

  

Hi everyone,

It came to our attention some extensions could output unsupported values to the platform. 

OutSystems uses a strongly typed language, and it doesn’t support or understand some values that we can pass using extensions. Null references are one of these values. The OutSystems language doesn't have a way of representing null references. These null references will be represented as -undefined- by the OutSystems language.

Extension developers should ensure that no Null references are passed to the OutSystems platform. To help them do this, we added the option “Add null checks to imported items” to the import actions from .Net assembly wizard of Integration Studio to ensure that the generated code obeys these rules. 

The table below lists the value that each OutSystems data type will have when an extension imported with null checks passes null references to OutSystems.


Data Type

Default value

Text

“”

Integer

0

Long Integer

0

Decimal

0

Boolean

False 

Date Time

#1900-01-01#

Date

#1900-01-01#

Time

#1900-01-01#

Phone Number

“”

Email

“”

Binary Data

new byte[0]

Object

new <object>

Currency

0

Record

new <record>

Record List

new <recordlist>

Integer Identifier

0

Text Identifier

“”

Long Integer Identifier

0


Thank you for the information Diogo.

I had the same problem with a very huge environment impacting many users from a NULL value in the output of an Extension in some specific cases. A really headache!!! 

OutSystems, When are you planning a milestone version to get this issue solved ???