Pre Default and Post Default Properties

Pre-Default and Post Default are two important field user properties available to us. 

Both properties have same purpose of assigning a Default value to a field in case user doesn’t provide any value. What is important to remember is that these values only take effect if user doesn’t provide any value.

Pre-Default value takes effect in case New Record and Copy Record event (In case copy record only if value of field is blank at the time of copy record)

Post-Default value takes effect when we save the record for the first time after its creation and the field value is blank. In Subsequent updates Post Default value doesn’t take effect.

Let’s have a look at requirement to understand these values better.

Requirement:

Status Field for Activities to be have value  “New Activity” as soon as a new Activity record is created and if user doesn’t provide value for field “Type” when creating New Activity then default value of field Type should be “Discount”

Solution:

In Pre-Default Value for Field “Status” give value as “New Activity” (without quotes).
In Post-Default value for Field “Type” give value as “Discount” (without quotes)

predefault-post-default

This brings an intersting question to my mind which I ask quite often when I take an interview.

What will happen if I Provide values in both ‘Pre-Default’ and ‘Post-Default’ properties of a field?

Read the interview section of this site to get an answer to above question.

7 Responses to Pre Default and Post Default Properties

  1. Hi Neel,

    I think the following stmt should be modified a bit:

    Neel: Pre-Default value takes effect in case New Record and Copy Record event (In case copy record only if value of field is blank at the time of copy record)

    Nani: For Copy Record, the predefault value will appear on the new record ONLY IF the ‘No Copy’ property of the field is set. i.e., if the ‘No Copy’ property is NOT set then, the new record will have what ever value, the old record holds. If the value is NULL then NULL is set, if there is some value X then the new record will have the value X for the field.

    Hope you agree.

    — Nani.

  2. Hi Neel,

    I think the following stmt should be modified a bit:

    Neel: Pre-Default value takes effect in case New Record and Copy Record event (In case copy record only if value of field is blank at the time of copy record)

    Nani: For Copy Record, the predefault value will appear on the new record ONLY IF the ‘No Copy’ property of the field is set. i.e., if the ‘No Copy’ property is NOT set then, the new record will have what ever value, the old record holds. If the value is NULL then NULL is set, if there is some value X then the new record will have the value X for the field.

    Hope you agree.

    — Nani.

  3. Nani, I don’t think you are right. I tried it at my own end. If you make the value of the null and copy the record then pre-default value takes effect.

  4. Nani, I don’t think you are right. I tried it at my own end. If you make the value of the null and copy the record then pre-default value takes effect.

  5. it will pick the pre default value if that field value is not changed by the user and if it is changed than it will use th epost default value

Leave a Reply

Contribute