You need to sign in to do that
Don't have an account?
Jyoti Trailhead
Check user location and show tile based on Location on Visualforce page
Hi
I have an existing VF page which doesn't have any cotroller - it is showing links to others tabs/ pages, I need to show one tile to users only if they are from one particular location - user.location field in User object.
Here is my code:
<tr onClick="parent.addTab('BMCRF_HR_ListTickets','Tickets and Requests')">
<td class="button" width="38em" height="69">
<div>
<apex:image style="float:left; margin:1; width:44px; height:45px;" value="{!URLFOR($Resource.BMCRF_ViewTickets1)}"/>
<div style="float:inherit">View Tickets</div>
</div>
</td>
</tr>
<tr onClick="parent.addTab('BMCRF_HR_KnowledgeArticles','Self Help Articles')">
<td class="button" width="38em" height="69">
<div>
<apex:image style="float:left; margin:1; width:44px; height:45px;" value="{!URLFOR($Resource.BMCRF_ViewKA1)}"/>
<div style="float:inherit">View HR and Benefits Knowledge Articles</div> <!--Code Change(Mayur): Label changed from View Knowledge Articles-->
</div>
</td>
</tr>
<tr>
<td class="button" width="38em" height="69">
<div>
<apex:image style="float:left; margin:1; width:44px; height:45px;" value="{!URLFOR($Resource.BMCRF_ViewKA1)}"/>
<apex:outputLink target="_blank" value="https://www.salesforce.com" id="HRChatbot">HR Chatbot</apex:outputLink>
<!--<div style="float:inherit">HR Chatbot</div> <!--Code Change(Mayur): Label changed from View Knowledge Articles-->
</div>
</td>
</tr>
I need to show the bold HR Chatbot option only to North America users.
Please help.
Regards
I have an existing VF page which doesn't have any cotroller - it is showing links to others tabs/ pages, I need to show one tile to users only if they are from one particular location - user.location field in User object.
Here is my code:
<tr onClick="parent.addTab('BMCRF_HR_ListTickets','Tickets and Requests')">
<td class="button" width="38em" height="69">
<div>
<apex:image style="float:left; margin:1; width:44px; height:45px;" value="{!URLFOR($Resource.BMCRF_ViewTickets1)}"/>
<div style="float:inherit">View Tickets</div>
</div>
</td>
</tr>
<tr onClick="parent.addTab('BMCRF_HR_KnowledgeArticles','Self Help Articles')">
<td class="button" width="38em" height="69">
<div>
<apex:image style="float:left; margin:1; width:44px; height:45px;" value="{!URLFOR($Resource.BMCRF_ViewKA1)}"/>
<div style="float:inherit">View HR and Benefits Knowledge Articles</div> <!--Code Change(Mayur): Label changed from View Knowledge Articles-->
</div>
</td>
</tr>
<tr>
<td class="button" width="38em" height="69">
<div>
<apex:image style="float:left; margin:1; width:44px; height:45px;" value="{!URLFOR($Resource.BMCRF_ViewKA1)}"/>
<apex:outputLink target="_blank" value="https://www.salesforce.com" id="HRChatbot">HR Chatbot</apex:outputLink>
<!--<div style="float:inherit">HR Chatbot</div> <!--Code Change(Mayur): Label changed from View Knowledge Articles-->
</div>
</td>
</tr>
I need to show the bold HR Chatbot option only to North America users.
Please help.
Regards
<apex:outputPanel rendered="{!ISPICKVAL($User.Region__c,'North America')}">
All Answers
<tr style="display: {IF(({!$User.Office_Location__c} eq 'Noida,India'), 'none', 'table-row')};">
<td class="button" width="38em" height="69">
<div>
<apex:image style="float:left; margin:1; width:44px; height:45px;" value="{!URLFOR($Resource.BMCRF_ViewKA1)}"/>
<apex:outputLink target="_blank" value="https://www.salesforce.com" id="HRChatbot">HR Chatbot</apex:outputLink>
<!--<div style="float:inherit">HR Chatbot</div> <!--Code Change(Mayur): Label changed from View Knowledge Articles-->
</div>
</td>
</tr>
<apex:outputPanel rendered="{!ISPICKVAL($User.Region__c,'North America')}">