function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MattiSalokangasMattiSalokangas 

Display Default Values for NULL Dates in Custom Objects

Is there a way for displaying a default value such as a dash "-" for datetime values in custom objects?  

 

For example, say I have a Widget with a DateLastAccessed property of type datetime and upon creation of the object I do not have a date for DateLastAccessed.  How might I display "-" in place of this value in Salesforce?

 

Some background, I am using .net and the partner wsdl.

 

Thank you.

 

Matti 

Best Answer chosen by Admin (Salesforce Developers) 
aalbertaalbert
You can configure a Default Value in the field properties within the salesforce.com UI. Go to the custom object, and edit the custom field in question. Therefore, if no value is explicitly set on create, this value will be set as the default.

All Answers

aalbertaalbert
You can configure a Default Value in the field properties within the salesforce.com UI. Go to the custom object, and edit the custom field in question. Therefore, if no value is explicitly set on create, this value will be set as the default.
This was selected as the best answer
kerwintangkerwintang

I think you can also opt to use a formula field for this, just to display your custom value in place of any null value.

 

Regards,

Kerwin