Email field has extra html tags when queried when used in a formula field which has a image.
Last updated 2017-10-14 ·Reference W-3819704 ·Reported By 0 users
When a custom email filed is included in a formula, the results are inconsistent between Classic and Lightning UI .
When we query the formula field in developer console or Apex code we get the mail to link appended to email field when the formula contains an image.Otherwise the query will result only a text value in formula field.
This can be repro in any Spring'17 org:
1. Create a picklist custom field called 'Security_Access__c' on any object
2. Create a email custom field called 'Email__c'.
3. Create a formula custom field with formula as:
IF(ISPICKVAL(Security_Access__c, '1') , Email__c , 'test')
4.Create a record and fill data in all fields so that email field is returned in formula and save the record.
5. In Classic UI, email field will appears with link, but in Lightning UI email field will appears as text ON UI and when you query the record the formula field will show as text.
Note: If you change the formal to the one below, email field will be appear as link in both UI.
IF(ISPICKVAL(Security_Access__c, '1') , Email__c , IMAGE('/resource/Confidential','test'))
and in the query the value returned will have HTML: <A HREF="mailto:> </A> tags apended to it.
Note: The link included in IMAGE function in formula field above can be link to any of the images in your static resources.
There is no workaround for this
Reported By (0)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.