Skip to main content
added 1289 characters in body
Source Link
mirantii
  • 15
  • 1
  • 7

VisualForce Page visible for me, but not for others based on JS onload funtion

I have created a Visualforce Page and put it in the Account Layout, the Related Tab, at the end of the page.

  1. Within the Setup environment, I have enabled all profiles to access the page.
  2. 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), based onpasses this {dispaly: none} buttonone 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" styleClass="SubscriptionNone">style="display:none">
    <apex:pageBlock id="selectPub0">
        <apex:commandButton value="{!Account.AccountNumber}" onclick="setVar()" 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>

</apex:outputPanel> </apex:form >

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, which basically is {!AccountmyHiddenField_002 or AccountNumber var.AccountNumber}

Interestingly enough, I could see values for Account.AccountNumber within the button and also in the developers console, but apparantly others do not. Others can too. Problem must occur afterwards in myHiddenField_002 or in the controller function. I am stuck now and would appreciate any ideas

VisualForce Page visible for me, but not for others

I have created a Visualforce Page and put it in the Account Layout, the Related Tab, at the end of the page.

  1. Within the Setup environment, I have enabled all profiles to access the page.
  2. 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, based on this {dispaly: none} button:

<apex:outputPanel title="Subscription List 00" id="subscriptions_list_00" styleClass="SubscriptionNone">
<apex:pageBlock id="selectPub0">
    <apex:commandButton value="{!Account.AccountNumber}" onclick="setVar()" id="myHiddenField" rerender="subscriptions_list_01" >
        <apex:param name="AccountNumber" value="{!Account.AccountNumber}" assignTo="{!AccountNumber}"/>
    </apex:commandButton>
</apex:pageBlock>

</apex:outputPanel>

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();
    });
});

So, the whole page would not work if there isnt't a value for myHiddenField, which basically is {!Account.AccountNumber}

Interestingly enough, I could see values for Account.AccountNumber within the button and also in the developers console, but apparantly others do not. I am stuck now and would appreciate any ideas

VisualForce Page visible for me, but not for others based on JS onload funtion

I have created a Visualforce Page and put it in the Account Layout, the Related Tab, at the end of the page.

  1. Within the Setup environment, I have enabled all profiles to access the page.
  2. 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>

</apex:outputPanel> </apex:form >

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

added 1289 characters in body
Source Link
mirantii
  • 15
  • 1
  • 7

I have created a Visualforce Page and put it in the Account Layout, the Related Tab, at the end of the page.

  1. Within the Setup environment, I have enabled all profiles to access the page.
  2. 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, based on this {dispaly: none} button:

<apex:outputPanel title="Subscription List 00" id="subscriptions_list_00" styleClass="SubscriptionNone">
<apex:pageBlock id="selectPub0">
    <apex:commandButton value="{!Account.AccountNumber}" onclick="setVar()" id="myHiddenField" rerender="subscriptions_list_01" >
        <apex:param name="AccountNumber" value="{!Account.AccountNumber}" assignTo="{!AccountNumber}"/>
    </apex:commandButton>
</apex:pageBlock>

<apex:outputPanel title="Subscription List 00" id="subscriptions_list_00" styleClass="SubscriptionNone"> <apex:pageBlock id="selectPub0"> <apex:commandButton value="{!Account.AccountNumber}" onclick="setVar()" id="myHiddenField" rerender="subscriptions_list_01" > <apex:param name="AccountNumber" value="{!Account.AccountNumber}" assignTo="{!AccountNumber}"/> </apex:commandButton> </apex:pageBlock> <</apex:outputPanel>

The button just holds the value within the myHiddenField. So, on document ready, I have a javascript:

$(document).ready(function() { $.when( document.getElementById("myHiddenField") != null ).done(function( x ) { var param = jQuery('[id$=myHiddenField]').val(); jQuery('[id$=myHiddenField_002]').val(param); passStringToController(); }); });

<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();
    });
});

So, the whole page would not work if there isnt't a value for myHiddenField, which basically is {!Account.AccountNumber}

Interestingly enough, I could see values for Account.AccountNumber within the button and also in the developers console, but apparantly others do not. I am stuck now and would appreciate any ideas

I have created a Visualforce Page and put it in the Account Layout, the Related Tab, at the end of the page.

  1. Within the Setup environment, I have enabled all profiles to access the page.
  2. 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, based on this {dispaly: none} button:

<apex:outputPanel title="Subscription List 00" id="subscriptions_list_00" styleClass="SubscriptionNone"> <apex:pageBlock id="selectPub0"> <apex:commandButton value="{!Account.AccountNumber}" onclick="setVar()" id="myHiddenField" rerender="subscriptions_list_01" > <apex:param name="AccountNumber" value="{!Account.AccountNumber}" assignTo="{!AccountNumber}"/> </apex:commandButton> </apex:pageBlock> </apex:outputPanel>

The button just holds the value within the myHiddenField. So, on document ready, I have a javascript:

$(document).ready(function() { $.when( document.getElementById("myHiddenField") != null ).done(function( x ) { var param = jQuery('[id$=myHiddenField]').val(); jQuery('[id$=myHiddenField_002]').val(param); passStringToController(); }); });

So, the whole page would not work if there isnt't a value for myHiddenField, which basically is {!Account.AccountNumber}

Interestingly enough, I could see values for Account.AccountNumber within the button and also in the developers console, but apparantly others do not. I am stuck now and would appreciate any ideas

I have created a Visualforce Page and put it in the Account Layout, the Related Tab, at the end of the page.

  1. Within the Setup environment, I have enabled all profiles to access the page.
  2. 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, based on this {dispaly: none} button:

<apex:outputPanel title="Subscription List 00" id="subscriptions_list_00" styleClass="SubscriptionNone">
<apex:pageBlock id="selectPub0">
    <apex:commandButton value="{!Account.AccountNumber}" onclick="setVar()" id="myHiddenField" rerender="subscriptions_list_01" >
        <apex:param name="AccountNumber" value="{!Account.AccountNumber}" assignTo="{!AccountNumber}"/>
    </apex:commandButton>
</apex:pageBlock>

</apex:outputPanel>

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();
    });
});

So, the whole page would not work if there isnt't a value for myHiddenField, which basically is {!Account.AccountNumber}

Interestingly enough, I could see values for Account.AccountNumber within the button and also in the developers console, but apparantly others do not. I am stuck now and would appreciate any ideas

added 1289 characters in body
Source Link
mirantii
  • 15
  • 1
  • 7

I have created a Visualforce Page and put it in the Account Layout, the Related Tab, at the end of the page.

  1. Within the Setup environment, I have enabled all profiles to access the page.
  2. 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, based on this {dispaly: none} button:

<apex:outputPanel title="Subscription List 00" id="subscriptions_list_00" styleClass="SubscriptionNone"> <apex:pageBlock id="selectPub0"> <apex:commandButton value="{!Account.AccountNumber}" onclick="setVar()" id="myHiddenField" rerender="subscriptions_list_01" > <apex:param name="AccountNumber" value="{!Account.AccountNumber}" assignTo="{!AccountNumber}"/> </apex:commandButton> </apex:pageBlock> </apex:outputPanel>

The button just holds the value within the myHiddenField. So, on document ready, I have a javascript:

$(document).ready(function() { $.when( document.getElementById("myHiddenField") != null ).done(function( x ) { var param = jQuery('[id$=myHiddenField]').val(); jQuery('[id$=myHiddenField_002]').val(param); passStringToController(); }); });

So, the whole page would not work if there isnt't a value for myHiddenField, which basically is {!Account.AccountNumber}

Interestingly enough, I could see values for Account.AccountNumber within the button and also in the developers console, but apparantly others do not. I am stuck now and would appreciate any ideas

I have created a Visualforce Page and put it in the Account Layout, the Related Tab, at the end of the page.

  1. Within the Setup environment, I have enabled all profiles to access the page.
  2. 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.

I have created a Visualforce Page and put it in the Account Layout, the Related Tab, at the end of the page.

  1. Within the Setup environment, I have enabled all profiles to access the page.
  2. 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, based on this {dispaly: none} button:

<apex:outputPanel title="Subscription List 00" id="subscriptions_list_00" styleClass="SubscriptionNone"> <apex:pageBlock id="selectPub0"> <apex:commandButton value="{!Account.AccountNumber}" onclick="setVar()" id="myHiddenField" rerender="subscriptions_list_01" > <apex:param name="AccountNumber" value="{!Account.AccountNumber}" assignTo="{!AccountNumber}"/> </apex:commandButton> </apex:pageBlock> </apex:outputPanel>

The button just holds the value within the myHiddenField. So, on document ready, I have a javascript:

$(document).ready(function() { $.when( document.getElementById("myHiddenField") != null ).done(function( x ) { var param = jQuery('[id$=myHiddenField]').val(); jQuery('[id$=myHiddenField_002]').val(param); passStringToController(); }); });

So, the whole page would not work if there isnt't a value for myHiddenField, which basically is {!Account.AccountNumber}

Interestingly enough, I could see values for Account.AccountNumber within the button and also in the developers console, but apparantly others do not. I am stuck now and would appreciate any ideas

deleted 64 characters in body; edited tags
Source Link
Adrian Larson
  • 151.4k
  • 38
  • 247
  • 431
Loading
Source Link
mirantii
  • 15
  • 1
  • 7
Loading