• DaveH
  • NEWBIE
  • 160 Points
  • Member since 2011

  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 61
    Replies

Hi, I might be missing something very simple here.

 

Is it possible to use InputField, or an alternate tag, that is not connected to a field in the database? ie It is for entering a value that is passed to the controller but isn't stored once the record is saved. Essentially, I'd like the user interface to have a set of fields that the user can enter data in, the controller processes that data and populates a "real" field—a helping-to-ensure-the-quality-of-data thing.

 

I could simply create extra fields in the database but having storage set aside for data that has no value and will never be used ever again irks me a bit.

 

Or is this the only option?

 

Regards

MellowRen

Hi,  I have an object called Tasks__c and I am building an editable table for users to update the status of their tasks.  These are both my extension code and visualforce code.  I followed the guide to the word and cannot figure out why it is giving me an error:

 

<apex:page standardController="Tasks__c" recordSetVar="Tasks__c" extensions="TasksByUserID"
   tabstyle="My_Tasks__tab" sidebar="true">
   <apex:form > 
   <apex:pageBlock title="Hello {!$User.FirstName}!  Here are your tasks">
   <apex:pageMessages />
   <apex:pageBlockButtons >
      <apex:commandButton value="Save" action="{!save}"/>
   </apex:pageBlockButtons>

   <apex:pageBlockTable value="{!taskRecords}" var="tsk">
      <apex:column value="{!tsk.name}"/>
      <apex:column value="{!tsk.Action_to_Perform__c}"/>      
      <apex:column value="{!tsk.AGN_Employee_Change__c}"/>
      <apex:column value="{!tsk.Application__c}"/>
      <apex:column value="{!tsk.Date_Due__c}"/>
      
      <apex:column headerValue="Current Status">
         <apex:inputField value="{!tsk.Current_Status__c}"/>
      </apex:column>

   </apex:pageBlockTable>
   </apex:pageBlock>
   </apex:form>
</apex:page>

 

public with sharing class TasksByUserID {

    private final Tasks__c userTasks; 
    
    public TasksByUserID(ApexPages.StandardSetController controller) {

        this.userTasks = (Tasks__c)controller.getRecord();

    }
      
        public ApexPages.StandardSetController taskRecords{
        get {
            if(taskRecords == null) {
                return new ApexPages.StandardSetController(
                         Database.getQueryLocator(
                [SELECT name, Action_to_Perform__c, AGN_Employee_Change__c, Application__c, Date_Due__c,
                Current_Status__c FROM Tasks__c where Assigned_To__c =:Userinfo.getUserId()]));
            }
            return taskRecords;
        }
        private set;
    }
    
    public PageReference save() {
        return null;
    }
    public List<Tasks__c> getTasks() {
         return (List<Tasks__c>) taskRecords.getRecords();
    }  
    
}

 

Hello there!

 

This is my first post and I am incredibly new at creating VisualForce pages so please bear with me!

I have been searching the forums and reading up on a few different resources to accomplish my needs and I am comfortable creating the main content in my VisualForce page.

 

I created a custom button on my Case Detail page that navigates me to my VF page when a New Field Service needs to be created. All is working well (for the most part, still trying to figure out how to reliably fill in two look-up fields).

 

The problem I have is I want the "Save" button on the VF page to take me back to the original object and fill in a custom field on the Case Detail page with the service record created. I believe I have to do this with a Controller but I am getting confused as to how to implement this controller (as I am new to this). Also, is there a way to just link the VF custom button to the Case Detail page without a Controller?

 

The code for my VisualForce page is as follows:

 

<apex:page standardController="Field_Service__c">
  <apex:form >
    <apex:pageBlock title="New Field Service" mode="edit" id="thePageBlock">
      
      <apex:pageBlockButtons >
        <apex:commandButton action="retURL=/{!Field_Service__c.Case__c}+CF00NC0000005NROt={!Field_Service__c.Name}" value="Save"/>
        <apex:commandButton action="{!cancel}" value="Cancel"/>
      </apex:pageBlockButtons>
      
      <apex:pageBlockSection title="Information" columns="2">
        <apex:inputField value="{!Field_Service__c.Name}"/>
        <apex:inputField value="{!Field_Service__c.Store_Detail__c}"/>
        <apex:inputField value="{!Field_Service__c.Date_of_Service__c}"/>
        <apex:inputField value="{!Field_Service__c.Case__c}"/>
        <apex:inputField value="{!Field_Service__c.Field_Service_Name__c}"/>
        <apex:inputCheckbox value="{!Field_Service__c.Parts_Used__c}">
            <apex:actionSupport event="onchange"
                                rerender="thePageBlock"
                                status="status"/>
        </apex:inputCheckbox>
        <apex:inputField value="{!Field_Service__c.Field_Service_Description__c}" style="width: 98%; height: 40px"/>
        <apex:inputCheckbox value="{!Field_Service__c.Equipment_Rented__c}">
            <apex:actionSupport event="onchange"
                                rerender="thePageBlock"
                                status="status"/>
        </apex:inputCheckbox>
        <apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
        <apex:actionStatus startText="Updating..." id="status"/>


      </apex:pageBlockSection>
      <apex:pageBlockSection title="Parts"  
      columns="2">
          <apex:inputField value="{!Field_Service__c.Service_Performed_By__c}">
              <apex:actionSupport event="onchange"
                                  rerender="thePageBlock"
                                  status="status"/>
          </apex:inputField>
          <apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
          <apex:inputField value="{!Field_Service__c.Agilence_Technician__c}"
              rendered="{!Field_Service__c.Service_Performed_By__c='Agilence Customer Support' || Field_Service__c.Service_Performed_By__c='Both'}"/>
          <apex:inputField value="{!Field_Service__c.Contractor__c}"
              rendered="{!Field_Service__c.Service_Performed_By__c='External Contractor' || Field_Service__c.Service_Performed_By__c='Both'}"/>
      </apex:pageBlockSection>
      
      <apex:pageBlockSection title="Parts"  
      columns="1" 
      rendered="{!Field_Service__c.Parts_Used__c=true}">
       
        <apex:dataTable value="{!Field_Service__c}" var="part" 
        border="1" 
        cellspacing="4" 
        cellpadding="4" 
        align="center" 
        style="text-align: center; width: 80%"> 
             <apex:column headerValue="Quantity" style="width: 10%">
                  <apex:inputField value="{!Field_Service__c.Part_1_Quantity__c}" style="width: 99%"/>
                  <apex:inputField value="{!Field_Service__c.Part_2_Quantity__c}" style="width: 99%"/>
                  <apex:inputField value="{!Field_Service__c.Part_3_Quantity__c}" style="width: 99%"/>
                  <apex:inputField value="{!Field_Service__c.Part_4_Quantity__c}" style="width: 99%"/>
             </apex:column>
             <apex:column headerValue="Part Name" style="width: 20%">
                  <apex:inputField value="{!Field_Service__c.Part_1__c}" style="width: 99%"/>
                  <apex:inputField value="{!Field_Service__c.Part_2__c}" style="width: 99%"/>
                  <apex:inputField value="{!Field_Service__c.Part_3__c}" style="width: 99%"/>
                  <apex:inputField value="{!Field_Service__c.Part_4__c}" style="width: 99%"/>
             </apex:column>
              <apex:column headerValue="Model Number" style="width: 20%">
                  <apex:inputField value="{!Field_Service__c.Part_1_Model_Number__c}" style="width: 99%"/>
                  <apex:inputField value="{!Field_Service__c.Part_2_Model_Number__c}" style="width: 99%"/>
                  <apex:inputField value="{!Field_Service__c.Part_3_Model_Number__c}" style="width: 99%"/>
                  <apex:inputField value="{!Field_Service__c.Part_4_Model_Number__c}" style="width: 99%"/>
             </apex:column>
         <apex:column headerValue="Serial Number" style="width: 20%">
          <apex:inputField value="{!Field_Service__c.Part_1_Serial_Number__c}" style="width: 99%"/>
          <apex:inputField value="{!Field_Service__c.Part_2_Serial_Number__c}" style="width: 99%"/>
          <apex:inputField value="{!Field_Service__c.Part_3_Serial_Number__c}" style="width: 99%"/>
          <apex:inputField value="{!Field_Service__c.Part_4_Serial_Number__c}" style="width: 99%"/>
         </apex:column>
         <apex:column headerValue="Cost" style="width: 10%">
          <apex:inputField value="{!Field_Service__c.Part_1_Cost__c}" style="width: 99%"/>
          <apex:inputField value="{!Field_Service__c.Part_2_Cost__c}" style="width: 99%"/>
          <apex:inputField value="{!Field_Service__c.Part_3_Cost__c}" style="width: 99%"/>
          <apex:inputField value="{!Field_Service__c.Part_4_Cost__c}" style="width: 99%"/>
         </apex:column>
        </apex:dataTable>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Equipment"  
      columns="2" 
      rendered="{!Field_Service__c.Equipment_Rented__c=true}">
          <apex:inputField value="{!Field_Service__c.List_Equipment_Rented__c}" style="width: 99%"/>
          <apex:inputField value="{!Field_Service__c.Equipment_Rental_Cost__c}" style="width: 25%"/>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>

 I know there are many improvements to be made to my code. I just want to nail down basic functionality first before I begin to refine it.

 

Any suggestions are greatly appreciated!

My question is based on this and other threads which have solved this problem:

 

http://forums.sforce.com/t5/Visualforce-Development/Embedding-Visual-FOrce-page-in-standard-layout-access-to-std/td-p/116543

 

However in these other threads, they managed to have solved the problem window.top.location.href = "{!standardobject.id}".  This reloads the same page but however loses the window placement which is kept by a refresh.  I've tried using window.top.location.refresh() in the same context but to no avail.  

 

Is there another way of refreshing the parent salesforce page from a visualforce page?

 

Thanks in advance

Hi All,

 

Fired up Salesforce this morning to resume work on a VF page I've been working on. After opening the fairly large controller class in the Dev console and trying to save changes I get a modal window popup that states "STRING_TO_LONG Failed to create createContainerMember for containerId=XXXXXX: Body: data value too large". The class is 1362 lines long (not too uncommon). Anyone else receiving this error? I was not getting this error on Friday when I left for the weekend.

 

Thanks in advance!

  • January 14, 2013
  • Like
  • 0

Hey All,

 

I currently have a force.com site enabled in one of our sandboxes. This site allows external users to update a custom "Subscription" object which stores email preferences. The problem I am having is when a user FIRST visits the page all of the data displayed on the page is correct. When the user updates some info and clicks Save, they are redirected to a "Success" page if it was successful. The problem arises when the user then tries to go back to the page to view the changes, the data that is displayed is the old data. Even if the user hits refresh on their browser it still pulls the old data. Even if the user closes/reopens a new instance of the browser the data is old. I found this post: http://boards.developerforce.com/t5/Force-com-Sites/Related-list-values-not-refreshing-on-sites-pages/m-p/173649/highlight/true#M2500 but the suggestion in this did not help me because 1) Since it is the sandbox caching is not possible and 2) I did what they suggested and the same thing happens. Users do not need to login to see their preferences at the moment, all that you need is the correct ID in the URL string and it pulls the corresponding data. Since this is a test environment I can put the site for people to try it themselves (See below). Has anyone ran into this before? If you need code let me know and I can post select portions of it. Thanks in advance!

 

The site: *REMOVED*

 

  • November 09, 2011
  • Like
  • 0

Hey all,

 

I am very familiar wth Visualforce but this is my first time developing a Force.com site and an external page. I have a page that displays information about a custom object (Subscription__c). The details of the object aren't important. Now, the start page for a user to change their preferences is actually a redirect page. It checks for an id specified in the URL parameters and if it is supplied and valid the user is redirected to a second page. When I tested the page internally (with the URL /apex/MyPageName) everything works fine, the CSS looks good, the fields are all filled out with the data from the object ... etc. However, when I try to access the page externally using the domain name I lose all the CSS styling, the static resources (like any images) and also the fields do not get populated because I think the constructor for my VF page controller is getting called a second time when redirecting to the 2nd page (I am not using setRedirect(true) so that should not happen). I have a feeling there is something different going on under the hood when using Force.com versus internal VF pages but I can't figure it out. Anyone familiar with Force.com pages and have any ideas? I posted some code in the posts below.

 

  • November 08, 2011
  • Like
  • 0

Hey everybody,

 

I figured I would share a little trick that I used to get over a seemingly common and un answered question. I needed to have a Visualforce page that would redirect the user to a second VF page based on information passed in the URL query string. The tricky part here is that I caould not use the setRedirect() method because I needed to maintain the state of all variables in the controller. So, using a little javascript (very little) I was able to redirect the user to a page AND maintain the state of the controller object at the same time. See the code below:

 

Redirect Page:

 

<apex:page controller="PortalChangePreferencesController" showHeader="false" sidebar="false" id="thisPage">
<apex:form >
  <h1>Redirecting....</h1>
  <apex:commandButton action="{!redirectToPrefsPage}" rendered="true" id="button1" rendered="false"/>
  
  <script>
      var button = document.getElementById("{!$Component.button1}");
  </script>
  
</apex:form>

    <script>
      window.onload = new function() { button.click(); }
  </script>
</apex:page>

 Notice the commandButton calls a method in the controller that contains the redirect logic. The button IS NOT rendered. Next, the first bit of JScript initializes a variable that we will use to automatically click the button. The next step is to click the button when the page is loaded so I hooked a function onto the window.onload event and there you go! Now, when the page is loaded, the button will be automatically clicked and the method in the controller will redirect the user. I put the code for the controller below. Enjoy!

 

Controller:

 

public class PortalChangePreferencesController {

	public Subscription__c subscription { get; set; }
	private boolean redirect = true;
	
	public PortalChangePreferencesController() {
		String subId = ApexPages.CurrentPage().getParameters().get('subId');
		System.debug('SUB ID = ' + subId);
		
		if(subId != null && !subId.trim().equals(''))
		{
			Subscription__c result = [select Id, Email__c 
										from Subscription__c 
										where Id = :subId limit 1];
			
			if(result == null)
			{
				redirect = false;
			}
			else
			{
				this.subscription = result; 
			}
		}
		else
		{
			redirect = false;
		}
	}
	
	public PageReference redirectToPrefsPage() {
		if(redirect)
		{
			return Page.PrefLoginPage;
		}
		else return Page.Unauthorized;
	}
}

 NOTE: I apolgize if this question has been recently answered somewhere on the forums but if it was I am unable to find it so I figured I would post my solution.

  • November 07, 2011
  • Like
  • 0

Hey All,

 

I don't know if this is an actual problem or i'm just missing something really obvious. Anyways the issue I'm having is when I insert an object during a test method, If I query for that newly inserted object in the actual testMethod it returns the object. However, If I insert an object, then call a method that query's for that object it returns no results. It is kind of confusing to explain so I put some example code below. Any help would be greatly appreciated.

static testMethod void testCampMon() {     
        Client_ID__c newClient = new Client_ID__c(
                                                    Name = 'Test Client',
                                                    Client_ID__c = 'XXXXXXXXXXXXXXXXXXXXXXXX');
        insert newClient;     
        Test.startTest();
        
        // This will return the object
	Client_ID__c c = [select Name, Client_ID__c, Id from Client_ID__c limit 1];
	System.debug('C ID = ' + c.Id);
        
        // This just calls the same query above (without the limit)
        // However no records are returned
        Client_ID__c client2 = CampaignMonitorService.getClientIds()[0];
Test.stopTest();
    }

// Example getClientIds() method
public static List<Client_ID__c> getClientIds() {
        return [select Name, Client_ID__c, Id from Client_ID__c];

    }

 

  • October 28, 2011
  • Like
  • 0

I am trying to generate a class from a WSDL but the WSDL uses the <any> element. Wsdl2apex doesn't handle these tags and I get a Callout exception when I try to test the service because of it. Are there any known workarounds for this? I put a piece of the WSDL below as an example.

 

<s:element name="GetInfoByZIPResponse">

<s:complexType>

<s:sequence>

<s:element minOccurs="0" maxOccurs="1" name="GetInfoByZIPResult">

<s:complexType mixed="true">

<s:sequence>

<s:any/>   

</s:sequence>

</s:complexType>

</s:element>

</s:sequence>

</s:complexType>

</s:element>

  • October 18, 2011
  • Like
  • 0

All I want to do is set the default value in a Status picklist to Implemented when the button is clicked.  It doesn't even need to be displayed in the pop-up.  Just when Save is clicked and the page renders back to the change record, the Status needs to be Implemented.  Is that possible without a controller?

 

Code

<apex:page standardController="Change__c" extensions="impStartEnd"> 
<apex:form id="frm"> 
<apex:detail subject="{!Change__c.Id}" relatedList="false" title="false"/> 
<apex:outputPanel id="tstpopup" rendered="{!IF(isDisplayPopUp ==true,true,false)}" > 
<apex:outputPanel styleClass="popupBackground" layout="block" /> 
<apex:outputPanel styleClass="custPopup" layout="block"> 
<apex:pageMessages >
</apex:pageMessages> 
<apex:pageBlock >
<apex:pageBlockSection > 
<apex:inputField label="Actual Implementation Start Date / Time" value="{!Change__c.Implementation_Start_Date_Time__c}"/>
<apex:inputField label="Actual Implementation End Date / Time" value="{!Change__c.Implementation_End_Date_Time__c}"/>

<apex:outputPanel > 
<apex:CommandButton action="{!save}" value="Save!"/> 
<apex:CommandButton action="{!cancel}" value="cancel"/> 
</apex:outputPanel>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:outputPanel>
</apex:outputPanel>




</apex:form> 

<style type="text/css"> .errorMsg{ width:159px; } 
.custPopup{ background-color: white; border-width: 3px; 
border-style: solid; 
z-index: 9999; 
left: 25%; 
padding:10px;
position: absolute; 
width: 800px; 
//margin-left: -80px; top:100px; margin-left: -170px; 
//top:305px; 
border-radius: 5px; 
} 

.datePicker{z-index:10000}



.popupBackground{ background-color:black; opacity: 0.20; filter: alpha(opacity = 20); 
 position: absolute; width: 100%; height: 100%; top: 0; left: 0; 
 z-index: 997 } a.actionlink:hover{ text-decoration:underline; } 
 .customactionLink { color: #015BA7; font-weight: normal; text-decoration: none; } </style> 

 <script>
      function setFocusOnLoad() { }
</script>
</apex:page>

 

  • June 08, 2013
  • Like
  • 0

Hi I have a urgent requirement to edit specific rows on pageblocktable.

I am able to delete the specific row but not getting how to edit specific row.

 

can somebody share me a working code snippet so that i can refer and implement the logic.

 

Please help me

 

 

 

Hi,

       I  am trying to use dataloader for directly loading data from salesforce to MSSQL database viceversa.Could you please suggest me the steps,by some posts i have seen that create database.xml file and etc..Is it by manually.and describe me the steps.

 

 

 

 

Thanks in advance.

Hello everyone,

It is probably simple but I cannot find the solution.

With the code below the outputPanel is not stable. I tried all browsers. Why?

The same code works fine in a pure HTML page.

Note: With the JS script not embedded in a function, it works fine.

Thanks a lot for your help.

Jerome

--------------------

<apex:page controller="CNModConConContJS" sidebar="false" showHeader="false" id="CNModConConJS" >
<apex:form >
<p>ConsoL100km__c =</p>
<apex:inputField value="{!Modelv.ConsoL100km__c}" id="consoL100kmIF" />
<script>
var ConsoL100kmIF = document.getElementById("{!$Component.consoL100kmIF}");
</script>
<apex:commandButton value="Conso Converter" onclick="consoMilGalCal()" reRender="ConsoMilGal"/>
</apex:form>
<apex:outputPanel id="ConsoMilGal">
<p id="consoL100kmP"></p>
<p id="consoMilGalP"></p>
</apex:outputPanel>
<script type="text/javascript">
function consoMilGalCal(form){
var ConsoL100kmJS = parseFloat((ConsoL100kmIF.value).replace(",",".")).toFixed(2);
var ConsoMilGalJS = (237/ConsoL100kmJS).toFixed(2);
var TextConsoL100km = 'JS Value of ConsoL100km =';
var TextConsoMilGal = 'JS Value of ConsoMilGal =';
document.getElementById("consoL100kmP").innerHTML = TextConsoL100km+ConsoL100kmJS;
document.getElementById("consoMilGalP").innerHTML = TextConsoMilGal+ConsoMilGalJS;
}
</script>
</apex:page>

Hi All,

 

I want to show an horizontal banner on Standard Salesforce detail page of a record.

The color of the banner will depend in Picklist Value (A,B,C,D).

For example if you choose A, then a RED benner should be shown.

 

I don't know if i can do it in Standard, or i should create a visualforce page.

 

Thx for your help. 

 

Hi All,

I have a small requirement where the values are displayed on VF page and on click of pageblockbutton Edit, the quantity field should become editable

how will i achive that here what i am trying to do :

 

<apex:outputpanel id="cartshow">           
        <apex:facet name="header"></apex:facet>  
            <apex:pageBlock title="Selected items" id="cartsho" mode="readonly" rendered="{!rendered}">
                <apex:detail inlineEdit="true"/>
                <apex:pageBlockButtons >   
                    <apex:commandButton value="Remove Items" action="{!removeItem}"/>
                    <apex:commandButton value="Place Order" action="{!OrderPlaced}"/>
                    <apex:commandButton value="Edit" action="{!editOrder}" onclick="computeTotal"/>
                </apex:pageBlockButtons>
                <apex:pageBlockTable value="{!selectedProd}" var="c" >
                    <apex:column headerValue="Select">
                        <apex:inputCheckbox value="{!c.isSelected}"/>
                    </apex:column>
                    <apex:column width="20px">
                        <apex:commandButton value="Remove" action="{!remove}"/>                   
                    </apex:column>
                    <apex:column value="{!c.prodObj.name}" headerValue="Product Name" width="390px"/>
                    <apex:column value="{!c.prodObj.ProductCode}" headerValue="Product code"/>
                    <apex:column value="{!c.prodObj.Category__c}" headerValue="Product Category" width="390px"/>
                    <apex:column value="{!c.pricebookObj.UnitPrice}" headerValue="Product Price"/>
                    <apex:column value="{!c.quantity }" headerValue="Quantity"/>

                     <apex:column headerValue=" amount"

                                     <apex:outputText  /> </apex:column
                </apex:pageBlockTable>                
           </apex:pageBlock>
     </apex:outputPanel>

my requirement is on click of Edit button, I should be able to insert quantity and able to add amount. like quantity * amount.

Please suggest me some idea so that I can solve my issue.

Thanks & Regards,

Amit_

  • May 20, 2013
  • Like
  • 0

Hi ,

actionfunction not called. whats the mistake. please correct me where i am doing mistake.

 

I dont know if i am in right approach. I am pulling out price from LIST of products user enters tjhe quantity and total amount to be displayed. I am using param and actionfunction to do it.

I dont know if it will work onchange for a row in the list.

  please guide me.

 

 

VF :

<apex:form > 

<apex:actionFunction id="paramcall" name="paramcall" action="{!totalcount}" rerender="my">

<apex:param name="f" value="" assignTo="{!a.prodprice}"/>

<apex:param name="q" value="" assignTo="{!a.quantity}"/>

</apex:actionfunction>

</apex:form>

 

  <apex:form id="my">

 

<apex:pageBlock > Enter Search Value :

<apex:inputText value="{!searchkey}"/> 

<apex:commandButton value="Search" action="{!priceproduct}"/>

 

<apex:pageblockTable value="{!prwrp}" var="a">

<apex:column headervalue="Selected"><apex:inputcheckbox value="{!a.issel}"/>

</apex:column>

<apex:column headervalue="Name" >{!a.prodname}

</apex:column>

<apex:column headerValue="unitprice">

          <apex:outputText id="unitPrice" value="{!a.prodprice}"/>

        </apex:column>

 

<apex:column headerValue="Quantity" >

<apex:inputtext id="quantity" value="{!a.quantity}" onchange="paramcall(yes!)"  />

 

</apex:column>

 

 

<apex:column headerValue="total">

          <apex:outputText id="total"/>{!a.totalamount}

        </apex:column>

</apex:pageblockTable>

 

Apex: 

public integer total{get;set;}

public integer f{get;set;}
public integer q{get;set;}
public pagereference totalcount()
{
total = f * q;
system.debug(' total ' + total);
return null;
}

Hi what I am trying to do is that to Display the Names Of all Accounts as a command lInk and when the Specific account name is clicked then the related List of its contact should POP up on a different page.. How can I achieve this?

hi,

  i placed check box in vf page and also placed outputtext in vf page with escape=false.

when i clicked any place in vf page then it automatically check that heck box.when i placed escape=true then it working fine.

 

 

Any one ca u please helped me this.

 

thanks in advance.

anu

Hi,
In my visual force page i'm getting this error can any know about this 
please help me

 

 

see below link :

https://success.salesforce.com/questionDetail?qid=a1X30000000fbzxEAA

 

 

Thanks

 

I have 3 columns of radio buttons naming Present Absent and Leave. I want to take the Attendance of students. The problem is when i put the attendance like Present,Absent,Leave,Present. it is displaying as Present to all. i am submitting my 3 linked pages code for reference. Most Thankful if solved..

Thank you.

//Page 1
<apex:page showHeader="false" sidebar="false" controller="attsheet" ><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
 <center>
 <apex:form >
  <apex:panelGrid >  
   <Apex:pageblock title="Attendance">
    <apex:pageMessages ></apex:pageMessages> 
    <apex:outputText >Date</apex:outputText>
    <apex:inputField value="{!obj.Date__c}"/>
    <apex:outputText >Class</apex:outputText>
    <apex:inputText value="{!clss}" />
    <apex:outputText >Section</apex:outputText>
    <apex:inputText value="{!sec}"/>
    <apex:commandButton value="Go" action="{!go}" />
    <apex:commandButton value="Reset" action="{!reset}"/>
    <apex:commandButton value="Cancel" action="{!cancel}"/>
   </Apex:pageblock>
  </apex:panelGrid>
 </apex:form>
 </center>
</apex:page>
//Page2
<apex:page sidebar="false" showHeader="false" controller="attsheet" >
<apex:panelGrid >
  <apex:form >
   <apex:pageBlock >
     <apex:outputLabel >Date: </apex:outputLabel>
     <apex:outputField value="{!obj.Date__c}"/>
      <apex:commandButton value="Done" action="{!done}"/>
      <apex:pageBlockTable value="{!search}" var="b">
          <apex:column value="{!b.name}"/>
          <apex:column value="{!b.Name__c}"/>
          <apex:column value="{!b.Class__c}"/>
          <apex:column value="{!b.section__c}"/>
          <apex:column >
          <apex:selectRadio value="{!status}" >
          <apex:selectOptions value="{!items}" />
          </apex:selectRadio>
          </apex:column>
      </apex:pageBlockTable>
   </apex:pageBlock>
  </apex:form>
  </apex:panelGrid>
</apex:page>
//Page 3
<apex:page sidebar="false" showHeader="false" controller="attsheet">
  <apex:form >
  <apex:pageBlock >
   <apex:pageBlockTable value="{!search}" var="a">
    <apex:column value="{!a.Name}"/>
    <apex:column value="{!a.Name__c}"/>
    <apex:column value="{!a.Class__c}"/>
    <apex:column value="{!a.section__c}"/>
    <apex:column value="{!status}"/ >
    </apex:pageBlockTable>
 <apex:commandButton value="Go to page1" action="{!page1}"/>
  </apex:pageBlock> 
 </apex:form>
</apex:page>
//controller
public class attsheet {

    public PageReference done() {
        return page.attsheet2;
    }
public string status;
public Student_Attendance__c obj{set;get;}
public string clss{set;get;}
public string sec{set;get;}
public string search{set;}
 public attsheet(){
 obj = new Student_Attendance__c();
 }
 public list<student_Attendance__c> bk{set;get;}
 public list<student_Attendance__c> bk1{set;get;}
public pagereference go(){
try{
bk = [select id,name,name__c,class__c,date__c,section__c,status__c from Student_Attendance__c where class__c =:clss And section__c =: sec ];
for(Student_Attendance__c a:bk){
    if(a.Class__c ==clss  && a.section__c ==sec ){
return page.attsheet1;
}
}
}
catch (Exception E){
    return null;
}
apexPages.addMessage(new ApexPages.message(ApexPages.severity.Error,'Please Enter Missing Values'));
     return null;
}
public list<Student_Attendance__c> getsearch(){
return bk;
}
public pageReference reset(){
return new pageReference('https://c.ap1.visual.force.com/apex/attsheet');
}
public pageReference cancel(){
return null;
}
public List<SelectOption> getItems() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('Present','Present'));
options.add(new SelectOption('Absent','Absent'));
options.add(new SelectOption('Leave','Leave'));
 return options;
}
public string getStatus(){
return status;
}
public void setstatus(String status) {
        this.status = status;
    }
  
  public pageReference page1(){
  return page.attsheet;
  }
}

 

When I try to create a custom button for a payge layout that should target a VisualForce page I've created, if I select the VisualForce Page option for the "Content  Source" drop down, the "Content" drop down does not get populated with any of the VisualForce pages that have been created.

 

What do I need to do to correct this?

 

Thanks in advance.

Hi

 when am Executing the visualforcepage . here am using the Search Filter to display the Time sheet Record based on the Project we have selected  and am getting the view state Error

Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 135.875KB
  • May 17, 2013
  • Like
  • 0

Hi,

 

I have vf page with standard controller of obj1.

I want to display field of obj3 on that visualforce page.

 

Relation between these obj's are,

 

obj1--------Master

   |

   |

obj2--------Child of obj1 & Master of obj3

   |

   |

obj3--------Child of obj2

  

 

Kindly Help.