0

Requirement: Display a message/pop up/banner on Lead and Account record pages to make it evident that Lead or Account are of particular department. There is a checkbox which could be used to identify if it belongs to a particular department. for eg: xyz__c

My solution: Rather than write an aura or lwc which looks at the value of xyz__c I wanted to use Rich Text and set component visibility if xyz__c = True

Implementation: I have used Rich text component with a message highlighted in bold and red. In Set component visibility I have chosen the Record > Account_Type__c Equal True

When I did this in my scratch org it works a treat i.e. I can edit the field and the rich text displays based on it being checked or unchecked.

When I push it through CI the field seems to be ineditable.. The code I have committed looks as below

    <componentInstances>
        <componentInstanceProperties>
            <name>decorate</name>
            <value>true</value>
        </componentInstanceProperties>
        <componentInstanceProperties>
            <name>richTextValue</name>
            <value>&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b style=&quot;font-size: 14px; color: rgb(255, 0, 0);&quot;&gt;Please be aware this is a XYZ Lead&lt;/b&gt;&lt;/p&gt;</value>
        </componentInstanceProperties>
        <componentName>flexipage:richText</componentName>
        <visibilityRule>
            <criteria>
                <leftValue>{!Record.xyz__c}</leftValue>
                <operator>EQUAL</operator>
                <rightValue>true</rightValue>
            </criteria>
        </visibilityRule>
    </componentInstances>

This seems to lock the XYZ checkbox and it does not even display in when I click edit. It does work in Classic though (the editing part not the rich text)

Things I've done so far:

  1. Checked FLS
  2. Field not read only on page layout

What am I missing?

3
  • What else was included in the CI deploy other than the flexipage? Aug 20, 2021 at 16:21
  • The checkbox fields on lead and accounts and their lead to account mapping
    – SFDC_Dev
    Aug 20, 2021 at 16:33
  • 2
    Any reason you're fixated on the fact that it's used in the flexipage for conditional visibility? It seems like your question really is why is this field not editable and fields can be used as a criteria on flexipages with no impact on whether they're editable. The more relevant metadata to share would be your page layout and profile metadata changes you deployed as part of your CI. Aug 20, 2021 at 17:17

0

You must log in to answer this question.