Long Text Field Limitations

There are some actions in SF which cannot use long text fields.
For example:
* Filters in look up window.
* Filter in where clauses in SOQL.
* Track history for those fields value (SF can only track that the field has been changed).

Kind of workaround for this issues is to create another text field which contain the first 255 characters (or keyword) of the original long text, and use it in all relevant processes.

It's not perfect, but for many cases it will suffice.


I'll demonstrate it with 2 custom objects I created:
1.Author
2.Book

The Author have look up field to Book (Favourite Book), and in the look up I want
to allow filtering by long text field - description.

So I'll use the above workaround:


1.Create String field - short description






2.Create work flow + field update to populate this new field from the long text field.





3.Add the Short Description field to the filter fields.





In case you don't see this Lookup Filter Fields section in the object:
go to Setup -> App Setup --> Customise -->Search -->Search Settings

In the Lookup Settings select the check box in 'Enhance Lookup' for the relevant object.


4.Result: you can use the short description field to filter.




In addition, you can use the short description field for the other processes that mentions at the beginning (track history, SOQL query).





No comments:

Post a Comment

Retire of Permission on Profiles

If you are working as a Salesforce admin/developer you've probably heard somewhere that Salesforce is planning to make a significant cha...