Re: Inserting null value in custom object Date type field returns error

Anonymous
Not applicable

Inserting null value in custom object Date type field returns error

Hi....

I am trying to insert a null value in a Date field in a custom object from a .Net application, and I get an unexpected error back. I tried doing the same in the Opportunity object and the records get inserted.

Any hint?
Tags (1)
5 REPLIES 5
Alok_Ramsisaria
Level 10

Re: Inserting null value in custom object Date type field returns error

You can use the code below to insert a null value. You can add multiple fields in the array.
"fieldsToNull" => array('NameOfField' );

Anonymous
Not applicable

Re: Inserting null value in custom object Date type field returns error

Thanks...

I don't fully understand what your code does, or what language is it in... I am doing this from C#.

The problem is that, due to the way this is implemented, I don't have a way to validate if a value is null prior to building the object that will be used to send the API request for the operation. 

More than getting some fix (if anyone has it, it will be welcome) I would like to know or understand why this happens in custom objects but not in standard objects, and why it happens only for datetime fields and not for other datatypes... 
Anonymous
Not applicable

Re: Inserting null value in custom object Date type field returns error

Hi All,

Let's work this one through a support ticket so they can reach out to engineering as needed.
Anonymous
Not applicable

Re: Inserting null value in custom object Date type field returns error

Thanks Angelo!! Do you guys create the support ticket? Or should we do it?

I also have this other issue which I would appreciate if you could take a look...

http://community.marketo.com/MarketoDiscussionDetail?id=90650000000PjRIAA0

Sorry to bother with these, but we are developing an application that some of your customers are using and they are requiring certain functionalities that we need to provide... 

Regards

JP
Anonymous
Not applicable

Re: Inserting null value in custom object Date type field returns error

JP: Please go ahead and create the ticket and share your findings with this thread.