0

I am using simple rendered command to display Sender1 and Sender2 fields when Enclosure card is selected. This works perfectly in summer'18 IE version but not in Winter'19. Please suggest an workaround till SFDC support comes back. Below is the code:




    <apex:pageBlockSection id="Disp_RVP">            
        <apex:pageblockSectionItem rendered="{!If((VendorOrder__c.Comment__c == 'CTI_No_card_wanted' || VendorOrder__c.Comment__c == null),false,true)}" id="sender1Id">
        <apex:outputText value="Sender Name1:"/>
         <apex:inputField value="{!VendorOrder__c.RVP__c}" id="sender1"/>
        </apex:pageblockSectionItem>
    </apex:pageBlockSection>

    <apex:pageBlockSection id="Disp_RSD">            
        <apex:pageblockSectionItem rendered="{!If((VendorOrder__c.Comment__c == 'CTI_No_card_wanted' || VendorOrder__c.Comment__c == null),false,true)}" id="sender2Id">
        <apex:outputText value="Sender Name2:"/>  
            <apex:inputField value="{!VendorOrder__c.RSD__c}" id="sender2"/>
        </apex:pageblockSectionItem>
    </apex:pageBlockSection>

Many Thanks in Advance. Mahesh

2 Answers 2

1

I don't see any reason why this code shouldn't work, but it could be optimized:

<apex:pageBlockSection columns="2" rendered="{!VendorOrder__c.Comment__c == 'CTI_No_card_wanted' || ISBLANK(VendorOrder__c.Comment__c)}" id="Disp_RVP">            
     <apex:inputField label="Sender Name1:" value="{!VendorOrder__c.RVP__c}" id="sender1"/>
     <apex:pageBlockSectionItem />
     <apex:inputField label="Sender Name2:" value="{!VendorOrder__c.RSD__c}" id="sender2"/>
</apex:pageBlockSection>

Note the lack of use of {!if(cond,true,false)}, collapsing the sections into 1, and using the label attribute to avoid the need for apex:pageBlockSectionItem, and the use of ISBLANK to avoid the fact that some fields render as '' instead of null.

3
  • Thanks for code optimization suggestion, I will change it. The code works perfectly find in production Summer'18 in IE browser (Ver 11.0.9600.x) but not in Winter'19. SFDC support says to upgrade to 11.6 to make this work but as you know in corporates its a big deal. I wanted some workaround that works in our current IE version. Commented Oct 1, 2018 at 21:09
  • @MaheshRaghuraman Interesting. It's all rendered server-side, so there shouldn't be anything to break. If it's broken in Visualforce like this, then you're probably going to get creative with some CSS.
    – sfdcfox
    Commented Oct 1, 2018 at 21:25
  • yes it shouldn't be anything to break. This works fine in Chrome and other IE version except specified one. SFDC support said that "onChange event is not working as expected in the IE" and provided reference [github.com/jaredreich/pell/issues/84] but the SFDC internal team is yet to comment. - Thanks Mahesh Commented Oct 3, 2018 at 18:22
1

SFDC confirmed that its an issue in preview sandbox and fixed this IE behavior on oct/7/2018 (a week before Win'19) in all preview sandbox.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .