anusha(salesforce developer)

Formula Fields in Salesforce

Data types Formula field can return 
1.Checkbox - Calculate a boolean value
2.Currency - dollar or other currency amount and automatically format the field as a currency amount.
3.Date - Calculate a date.
4.Date/Time - Calculate a date/time
5.Number - Calculate a numeric value.
6.Percent - Calculate a percent and automatically add the percent sign to the number.
7.Text - Create a text string, for example, by concatenating other text fields.

limits:
1. Formula fields can contain up to 3,900 characters( including spaces, return characters,
and comments).If your formula requires more characters, create separate formula fields and
reference them in another formula field.The maximum number of displayed characters after
an evaluation of a formula expression is 1,300 characters.

2. Comments count against the character and byte size limits in formulas.
Comments must begin with a forward slash followed by an asterisk (/*), and conclude
with an asterisk followed by a forward slash (*/).Nesting comments causes a syntax error.
For example, you cannot save a formula that has the following:
/* /* comment */ */Commenting out a whole formula causes a syntax error.

3. If your formula references any number, currency, or percent fields,
choose an option for handling blank fields.To give any blank fields a zero value,
choose Treat blank fields as zeros. To leave these fields blank, choose Treat blank
fields as blanks.

4. Long text area, encrypted, and Description fields are not available for use in formulas.

5. The value of a field cannot depend on another formula that references it.

6. Fields referenced in formulas cannot be deleted
Remove the field from the formula before deleting it.

Date functions in formula fields

When calculating dates using fractions, Salesforce ignores any numbers beyond the decimal. For example:
TODAY() + 0.7 is the same as TODAY() + 0, which is today’s date
TODAY() + 1.7 is the same asTODAY() + 1, which is tomorrow’s date
TODAY() + (-1.8) is the same as TODAY() + (-1), which is yesterday’s date
To calculate the value of two fractions first, group them within parentheses. For example:
TODAY() + 0.5 + 0.5 is the same as TODAY() + 0 + 0, which is today’s date
TODAY() + (0.5+0.5) is the same as TODAY() + 1, which is tomorrow’s date
Years cannot be zero and must be between -4713 and 9999.

4 comments:

  1. Hi, content in your blog is very informative. i came to know many things compared to other blogs.
    thank you.

    ReplyDelete
  2. Wonderful great going, I love your work and look forward for more work from your side. I am a regular visitor of this site and by now have suggested many people.
    how to write a checks

    ReplyDelete
  3. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. and Subscribers Views Buy YouTube

    ReplyDelete