• Vachara
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 7
    Replies

Hi There,

 

Does anyone know how to force the VF page to go to a certain part of the page after clicking on a button?  For example,  as shown below, the user is at the top of the page (“Section A”).  After he clicks on a button, the VF page takes him to “Section C” of the page.  Thanks.

 

Section A

….

Section B

Section C

 

Best,

Ta

 

 

Best,

Ta

Hi,

 

I’m having issues rendering a page block. 

 

Here’s the setup: I have two page blocks.  As shown below, the two page block ID’s are “ReturnInfo” and “RequestQA”.  In the first page block “ReturnInfo”, a field called “{!eRMA__c.Request_QA_Details_Boolean__c}” conditionally gets set to either “true” or “false” in the controller.  When this field “{!eRMA__c.Request_QA_Details_Boolean__c}” gets set to “true”, the content of the second page block “RequestQA” is supposed to appear, but this is not happening.  I have already verified that the ““{!eRMA__c.Request_QA_Details_Boolean__c}” does indeed change to the appropriate value (true or false), but it seems like the new value is not getting to the second page block (“RequestQA”).  If I rendered the entire  VF page, this works fine, but it’s more efficient to render the second page block directly.  Please let me know what you think why this is not working?  Thanks.

 

<!--#### Return Information Section Start ##-->  

            <apex:pageBlockSection title="Step 4. Return Information" id="ReturnInfo" columns="2"> 

                <apex:pageBlockSectionItem >       

                                …

                                …

                                …

                <apex:pageBlockSectionItem id="specificRC">       

                    <apex:outputtext >Specific Reason Code </apex:outputtext>

                    <apex:outputtext >

                        <apex:outputPanel styleClass="requiredInput" layout="block">

                        <apex:outputPanel styleClass="requiredBlock" layout="block"/>                   

                            <apex:selectList value="{!eRMA__c.Specific_Reason_Code__c}" size="1" >

                                <apex:selectOptions value="{!returnSpecificRCList}" rendered="true"/>

                                <apex:actionSupport event="onchange" action="{!getReturnRequestAdditionInfo}" reRender="ReturnInfo,RequestQA" />

                                <apex:inputHidden value="{!eRMA__c.Request_QA_Details_Boolean__c}"/>

                            </apex:selectList>                    

                        </apex:outputPanel>

                    </apex:outputtext>                                     

                </apex:pageBlockSectionItem>              

 

                                …

                                …

                                …

 

<!--#### Request QA Section Start ##-->

          <apex:pageBlockSection showHeader="false"color: rgb(255, 192, 0);">RequestQA" columns="2" rendered="{!eRMA__c.Request_QA_Details_Boolean__c}">

 

                                …

                                …

                                …

 

Best,

Ta

Hi,

 

I'm having trouble getting the "ApexPages.addMessage" message to display in my VF page when there's an error.  Below is the code in the extensions that validates the input before saving the record.  Any help would be greatly appreciated.  Thank you in advance.

 

"

...
    //
    //Save current record
    //
    public PageReference save(){
        if (validate_save_data()) {                    
            ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Error: Invalid Input.');
            ApexPages.addMessage(myMsg);
            return null;
        } else {
            upsert erma;
            return (new ApexPages.StandardController(erma)).view();       
        }      
    }
 
    //
    // Validate input data before saving  
    //
    public boolean validate_save_data () {
        if (erma.sales_area__c == null) {
            return true;
        } else {
            return false;
        }
    }
...
"

Hi,

 

I'm having trouble getting the "ApexPages.addMessage" message to display in my VF page when there's an error.  Below is the code in the extensions that validates the input before saving the record.  Any help would be greatly appreciated.  Thank you in advance.

 

"

...
    //
    //Save current record
    //
    public PageReference save(){
        if (validate_save_data()) {                    
            ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Error: Invalid Input.');
            ApexPages.addMessage(myMsg);
            return null;
        } else {
            upsert erma;
            return (new ApexPages.StandardController(erma)).view();       
        }      
    }
 
    //
    // Validate input data before saving  
    //
    public boolean validate_save_data () {
        if (erma.sales_area__c == null) {
            return true;
        } else {
            return false;
        }
    }
...
"

Hi There,

 

Does anyone know how to force the VF page to go to a certain part of the page after clicking on a button?  For example,  as shown below, the user is at the top of the page (“Section A”).  After he clicks on a button, the VF page takes him to “Section C” of the page.  Thanks.

 

Section A

….

Section B

Section C

 

Best,

Ta

 

 

Best,

Ta

Hi,

 

I’m having issues rendering a page block. 

 

Here’s the setup: I have two page blocks.  As shown below, the two page block ID’s are “ReturnInfo” and “RequestQA”.  In the first page block “ReturnInfo”, a field called “{!eRMA__c.Request_QA_Details_Boolean__c}” conditionally gets set to either “true” or “false” in the controller.  When this field “{!eRMA__c.Request_QA_Details_Boolean__c}” gets set to “true”, the content of the second page block “RequestQA” is supposed to appear, but this is not happening.  I have already verified that the ““{!eRMA__c.Request_QA_Details_Boolean__c}” does indeed change to the appropriate value (true or false), but it seems like the new value is not getting to the second page block (“RequestQA”).  If I rendered the entire  VF page, this works fine, but it’s more efficient to render the second page block directly.  Please let me know what you think why this is not working?  Thanks.

 

<!--#### Return Information Section Start ##-->  

            <apex:pageBlockSection title="Step 4. Return Information" id="ReturnInfo" columns="2"> 

                <apex:pageBlockSectionItem >       

                                …

                                …

                                …

                <apex:pageBlockSectionItem id="specificRC">       

                    <apex:outputtext >Specific Reason Code </apex:outputtext>

                    <apex:outputtext >

                        <apex:outputPanel styleClass="requiredInput" layout="block">

                        <apex:outputPanel styleClass="requiredBlock" layout="block"/>                   

                            <apex:selectList value="{!eRMA__c.Specific_Reason_Code__c}" size="1" >

                                <apex:selectOptions value="{!returnSpecificRCList}" rendered="true"/>

                                <apex:actionSupport event="onchange" action="{!getReturnRequestAdditionInfo}" reRender="ReturnInfo,RequestQA" />

                                <apex:inputHidden value="{!eRMA__c.Request_QA_Details_Boolean__c}"/>

                            </apex:selectList>                    

                        </apex:outputPanel>

                    </apex:outputtext>                                     

                </apex:pageBlockSectionItem>              

 

                                …

                                …

                                …

 

<!--#### Request QA Section Start ##-->

          <apex:pageBlockSection showHeader="false"color: rgb(255, 192, 0);">RequestQA" columns="2" rendered="{!eRMA__c.Request_QA_Details_Boolean__c}">

 

                                …

                                …

                                …

 

Best,

Ta

Hi,

 

I'm having trouble getting the "ApexPages.addMessage" message to display in my VF page when there's an error.  Below is the code in the extensions that validates the input before saving the record.  Any help would be greatly appreciated.  Thank you in advance.

 

"

...
    //
    //Save current record
    //
    public PageReference save(){
        if (validate_save_data()) {                    
            ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Error: Invalid Input.');
            ApexPages.addMessage(myMsg);
            return null;
        } else {
            upsert erma;
            return (new ApexPages.StandardController(erma)).view();       
        }      
    }
 
    //
    // Validate input data before saving  
    //
    public boolean validate_save_data () {
        if (erma.sales_area__c == null) {
            return true;
        } else {
            return false;
        }
    }
...
"

Hello,

 

I'm using roles to try to restrict access to records.  It seems to work as expected for Edit, but not for read. 


I've created two accounts as follows:

 

Account   Owner 

100         a1         

200         a2        

 

User   Role  Profile

a1       A        B

a2       A        B

 

I have an object called O that has a field, F, that is defined as Master-Detail (Account)

 

a1 and a2 are both able to see each other's account information when accessing object O.  

 

Under sharing settings, I have no sharing rules defined, and Default Access has been set to Private for Account, and to Controlled By Parent for O.

 

Under Profiles, Basic Access is set to Read for both Accounts and O, and no Data Administration options have been checked.

 

I don't understand why a1 and a2 are still able to see each other's records.  What more do I need to do to restrict access?

 

Gloria Lee

 

  • October 23, 2009
  • Like
  • 0

I'm building a form in VisualForce, and I can't get the elements of a pageBlockSection to line up. Here's my problem: the dropdown label is not in bold, it is not aligned horizontally with the dropdown, and neither label nor dropdown is aligned with the inputFields below it.

 

How can I get these to align? It seems I would have to group the label and dropdown somehow.

 

 

 

 

Here's my visualforce code:

 

 

<apex:pageBlockSection title="Account Information" columns="1">

<apex:outputLabel value="Record Type" for="AccountRT"/>
<apex:selectList id="AccountRT" value="{!theAccountRecordTypeID}">
<apex:selectOptions value="{!theAccountRecordTypeOptions}"/>
</apex:selectList>

<apex:inputField value="{!theAccount.name}"/>

</apex:pageBlockSection>

 

 

 

 

  • September 11, 2009
  • Like
  • 0