[Contacts Plugin] Problem with Contact Dates prior to 1900

[Contacts Plugin] Problem with Contact Dates prior to 1900

  
Forge Component
(3)
Published on 2016-12-15 by OutSystems R&D
3 votes
Published on 2016-12-15 by OutSystems R&D

The FindContact action of the Contacts Plugin results in an error if it encounters a date (birthday in my case) before the year 1900.

The errormessage is:

Failed to deserialize JSON to ContactList: Could not convert '1899-08-09T12:00:00.000Z' to DateTime.

Hello CasaSpider,

From the documentation, the minimum value for a DATE type is 1900-01-01.

So, I think in order to workaround this, you will have to change the component in order to manipulate the JSON to avoid see this information as a DateTime, but instead, as a string, for example, in order to the Deserialization to work, or replace the default serialization function with one written by yourself.

At least, this is my first guess, based on previous questions on the same subject (the minimum limit of the Date/DateTime data type).

Cheers,

Eduardo Jauch

Hello Eduardo,

Thanks for your quick reply!

I am not the creator of the Contacts Plugin. Actually I'm hoping the creator will be triggered to make the change you suggested... :-)

As the plugin is supported by OutSystems, maybe other resources can be used as well.

Regards,

Peter.

CasaSpider wrote:

Hello Eduardo,

Thanks for your quick reply!

I am not the creator of the Contacts Plugin. Actually I'm hoping the creator will be triggered to make the change you suggested... :-)

As the plugin is supported by OutSystems, maybe other resources can be used as well.

Regards,

Peter.

Hi CasaSpider,

You can always clone the component and adapt the part that create the OutSystems list.
This "date" problem is old. I don't know if it's on OutSystems plans to solve it.

Lets see :)

Cheers,
Eduardo Jauch


Hi Eduardo,

I don't have experience yet with building a plugin.

Luckily OutSystems has reacted as well and they will dive into this matter.

One more question: How would I clone the component?

Thanks and regards,

Peter Nijhuis.

Hello, Peter,

You can open the respective module of the component and select 'Clone' from the top-left menu:

This will create a new, unpublished copy of the module, which you should publish it. Then you will need to create a new application and move the cloned module to the new application, similarly to how it's described here.

Please let us know how it went! :)

Best regards,

Carlos Simões

Hi Carlos,

Thanks for you answer, it gave me some clues.

I cloned the ContactsPlugin and found that the whole source is in GitHub.

Now I'm struggling with the JavaScript code which already has some code to correct "wrong" birthdays, but not enough... :-)

If I succeed, the next challenge is to use my version of the JavaScript code in my version of the ContactsPlugin. I like to know how that works, but in this case it seems a lot easier if OutSystems takes care of this, as many other users encounter the same problem with the ContactsPlugin.

Anyway, thanks again Carlos. I'm learning a lot of things integrating custom modules into OutSystems!

Regards,

Peter.