function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SIB AdminSIB Admin 

How to create a subsection that has salesforce editable fields

Hi,

I am trying to create a subsection in opportunity object that has two fields inside it.

1. Escalating Invoice Collection to SIB (checkbox)
2. Invoice Collection Escalation Notes (textbox)

I have written an apex code for that
<apex:page standardController="Opportunity" tabStyle="Opportunity">

<script>
function colorPageBlock(pageblock, color) {
if (pageblock != null) pageblock.firstChild.style.cssText = “background-color: ” + color + “;”;

}
</script>


<apex:form >


    <apex:pageBlock >

        <apex:pageBlockSection id="blueSection" title="Outsource Team Information">
            <apex:inputField value="{!opportunity.Escalating_Invoice_Collection_to_SIB__c}"/><tr></tr>
            <apex:inputField value="{!opportunity.Invoice_Collection_Escalation_Notes__c}"/>
            <script>colorPageBlock(document.getElementById("{!$Component.blueSection}"), "blue");</script>
        </apex:pageBlockSection>

    </apex:pageBlock>

</apex:form>

</apex:page>

But I am unable to edit the fields since this visualforce page does not show up on edit page layout and I can't even edit this on detail page as there is no save option.(Screenshot attached)

User-added image

Also, I want to change the color of "Outsource Team Information" bar from yellow to blue .

User-added image
SIB AdminSIB Admin
Any help would be appreciated.