I have created a Visualforce Page
and put it in the Account Layout, the Related Tab, at the end of the page.
- Within the Setup environment, I have enabled all profiles to access the page.
- I have enabled these options for the page:
- Available for Lightning Experience
- Lightning Communities
- mobile app
I am able to see the page within the view, but other people within the organisation are not.
EDIT:
I have researched a bit. My VF page is basically a table which renders if it finds the current Account AccountNumber (stored in myHiddenField), passes this one to myHiddenField_002 and then to controller:
<apex:form >
<!-- Hidden field to store the Account.AccountNumber value -->
<apex:outputPanel title="Subscription List 00" id="subscriptions_list_00" style="display:none">
<apex:pageBlock id="selectPub0">
<apex:commandButton value="{!Account.AccountNumber}" id="myHiddenField" rerender="subscriptions_list_01" >
<apex:param name="AccountNumber" value="{!Account.AccountNumber}" assignTo="{!AccountNumber}"/>
</apex:commandButton>
</apex:pageBlock>
</apex:outputPanel>
<apex:outputPanel title="Subscription List 007" id="subscriptions_list_007" style="display:none">
<apex:pageBlock id="selectPub007">
<!-- Hidden field to store a new value of the variable -->
<apex:inputHidden value="{!AccountNumber}" id="myHiddenField_002" />
<!-- Action function for the rerendering -->
<apex:actionFunction name="passStringToController" action="{!ReturnAccountNumber}" rerender="subscriptions_list_01"/>
</apex:pageBlock>
The button just holds the value within the myHiddenField. So, on document ready, I have a javascript:
<script>
$(document).ready(function() {
$.when( document.getElementById("myHiddenField") != null ).done(function( x ) {
var param = jQuery('[id$=myHiddenField]').val();
jQuery('[id$=myHiddenField_002]').val(param);
passStringToController();
});
});
Controller:
public String AccountNumber{get;set;}
public void ReturnAccountNumber(){
system.debug('AccountNumber' + AccountNumber);
}
and then perform some soql queries using AccountNumber var.
So, the whole page would not work if there isnt't a value for myHiddenField, myHiddenField_002 or AccountNumber var.
Interestingly enough, I could see values for Account.AccountNumber within the button and also in the developers console. Others can too. Problem must occur afterwards in myHiddenField_002 or in the controller function. I am stuck now and would appreciate any ideas