• JessB
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 7
    Replies
Can anyone provide a basic explanation of what Apex Code Coverage is, and how to increase it?
  • July 14, 2014
  • Like
  • 0
Hi,

I created a couple of VF pages in January, and one is no longer rendering an image that I have as <apex:image value="mylinkhere"  inside the code, that refers to an "Externally Available Image" in the Documents object. It's rendering as some kind of broken image (see the grey box with a tree), not the one I have uploaded in SF. Note, I checked the image source URL and it works; it's not a broken link.

The same page is also not loading any data/text in my tables beyond the initial header (everything below the YEAR(TODAY()) formula piece.

Both VF page versions are 30.0.

Please advice on what may have changed in Visualforce since January, and how I need to  update my code. A snippet is provided below. 
<apex:page standardController="Marketing_Action_Plan__c" renderAs="pdf" showheader="false" applyHtmlTag="false">
<apex:pageblock >
<head>
<title>Marketing Action Plan</title>
<apex:stylesheet value="/sCSS/20.0/sprites/1290470434000/Theme3/default/sf/common.css"/> 
<apex:stylesheet value="/sCSS/20.0/sprites/1290470434000/Theme3/default/sf/extended.css"/>
<style type="text/css">
td { font-family: helvetica; }
@page{
            margin:0.10in;
        }
</style>
</head>

<body>
<table style="width:600px" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td rowspan="4"><apex:image id="UltherapySeeTheBeautyofSound2" value="https://c.cs1.content.force.com/servlet/servlet.ImageServer?id=015S0000000Td3I&oid=00DS0000001Dcun&lastMod=1386700403000" width="159" height="40"/></td>
      </tr>
      <tr>
      <td style="font-size:18px" align="left" valign="left" bgcolor="white"><b>Marketing Action Plan </b></td>
    </tr>
    <tr>
     <td style="font-size:14px" align="left" valign="middle" bgcolor="white"><b>{!Marketing_Action_Plan__c.Account__r.name}</b></td>
    </tr>
    <tr>
      <td style="font-size:9px" align="left" valign="middle" bgcolor="white"><b>{!MONTH(TODAY())}/{!DAY(TODAY())}/{!YEAR(TODAY())}</b></td>
    </tr>
     </table>
<br/>
<br/>
<br/>
<table style="width:1500px" border="0" cellpadding="0" cellspacing="0">
<colgroup>
<col width="10"/>
<col width="1490"/>
</colgroup>
<tr>
<td style="font-size:12px" colspan="2"><b>{!if(Marketing_Action_Plan__c.Cust_Assmnt_Database__c="0-2500", "LOW", "")}</b></td></tr>
<tr>
<td style="font-size:11px" colspan="2"><b>{!if(Marketing_Action_Plan__c.Cust_Assmnt_Database__c="0-2500", "Tactics:", "")}</b></td></tr>
<tr>
<td style="font-size:6px">&nbsp;</td></tr>
<tr>
<td style="font-size:9px" colspan="2"><b>{!if(Marketing_Action_Plan__c.Cust_Assmnt_Database__c="0-2500", "Online Search", "")}</b></td></tr>
<tr>
<td style="font-size:7px">{!if(Marketing_Action_Plan__c.Cust_Assmnt_Database__c="0-2500", "", "")}</td>
<td style="font-size:7px">{!if(Marketing_Action_Plan__c.Cust_Assmnt_Database__c="0-2500", "How to Use Google AdWords", "")}</td>
</tr>
<tr>
<td style="font-size:7px">{!if(Marketing_Action_Plan__c.Cust_Assmnt_Database__c="0-2500", "", "")}</td>
<td style="font-size:7px">{!if(Marketing_Action_Plan__c.Cust_Assmnt_Database__c="0-2500", " • Optimize website", "")}</td>
</tr>
</table>
</body>
</apex:pageBlock>
</apex:page>

  • April 30, 2014
  • Like
  • 0
Hi,

I am trying to test the reason a trigger is firing for one account and not others that look similar. My trigger causes an error message to appear at the top of the page that looks exactly like a Validation Rule error. 

For the account with the error, I duplicated the account record, and duplicated the related object records that would cause other triggers to fire, but I am not receiving the error on the duplicated record.

Is there a way to have SF show me why the trigger is firing on the troublesome record?
  • April 11, 2014
  • Like
  • 1
Is there a way to set an iframe inside my VF that generates only the report results, for a visualforce page Dashboard?

I know you can add ?isdtp=nv to the end of the URL parameter to get rid of all the Salesforce sidebars/headers, but it still shows the report title, report Options, report buttons, and filters. How can I set the Visualforce code to only give me the table of results?


My use case: I need to generate a Dashboard with one table of the same results for every States in the US. My report has the State equals filter turned on, in which I can pass pv0=AZ (for example) to populate that filter. Currently, with SF dashboards, I would 52 separate reports for each state to create 52 dashboard components; but Dashboards only handle 20 components, so one Dashboard is out of the question.

I would like a VF page Dashboard to get all 52 states, using one source report, and passing the State through the URL; then only show the table of the report results that is only 4 columns wide.
  • February 20, 2014
  • Like
  • 0

Hi, I have a table that needs to pull the result of one custom field multipled by 12 (the current month for the year), for example.

 

I found this post: http://boards.developerforce.com/t5/Visualforce-Development/simple-calculation-within-page/m-p/532611#M57220 and tried it on my code, but my VF page is not returning any results (it's just blank).

 

Say the custom field is called "Quantity_This_Year__c" and I need "Quantity_This_Year__c*MONTH(TODAY())" result on the Vf Page.''

 

I have tried both MONTH(TODAY()) and just the number 12, and still, Vf page is blank next to this field.

 

Is that other post out of date? Anyone else know a way to perform a calculation where my result will not be blank?

  • December 16, 2013
  • Like
  • 0

If you have seen any of my other posts here, I am brand new to VF and totally inexperienced in APEX.

 

My task is to create a table on a VF page inside a Custom Object that is related to Accounts, that returns results from another related object to Accounts, called Sales Invoices.

 

So my table is 4 columns wide and 14 rows deep. The first three columns are the name of the month, and the 4th is the Quarter for those three months. The first row under the month returns a quantity, and the second is a dollar amount. Then the next three rows are for the 2nd quarter, 3rd quarter, 4th quarter, and last has quantity and dollar amount that returns the sum of the 4 quarters.

 

So, as an inexperienced developer with no budget for paying a developer, I would create 2 custom fields for each month, 2 custom fields for each quarter, and 2 custom fields for the yearly totals, and use the app Roll-up Helper to return values from the Sales Invoices in these fields on the Account record (and then reference the field on the Custom object in the VF page)... but that is 34 fields!

 

Let's see if I can clarify this a little better:

Row 1, column 1= January (just the word)

Row 2, column 2 = TOTAL quantity of all sales Invoices in January for that account

row 3, column 3 = TOTAL dollar amount of all sales invoices in January for that account

 

Row 1, column 2 = Feb... etc...

...

row 1 column 4 = Q1

Row 2 column 4 = quantity sum of column 1, column 2, and column 3

row 3 column 4 = dollar sum of column 1, column 2, and column 3

 

...

Row 4 colum 1 = April... etc.

 

Row 13, column 4 = TOTAL quantity of q1, q2, q3, q4

Row 14, column 4 - TOTAL dollar amount of q1, q2, q3, q4

 

 

So, what kind of development is involved to return essentally a custom report for that account, but in my VF and my own table?

  • December 16, 2013
  • Like
  • 0

This is probably a simple question, and I keep searching for an answer, but I'm getting more complicated questions/answers than I need.

 

I know how to insert a new column in VF <apex:column> but how do you do it for adding a row? So far, I can't figure out how to do this without creating a new data table for every row.

  • December 10, 2013
  • Like
  • 0

Hi,

 

My Custom Object is called Training (API is Training__c). This Custom Object's Parent in the Master-Detail relationship is Accounts.

 

I currently have a VF page that sits on the Custom Object that shows only the iFrame for the related Contact list, but it allows users to edit the Contacts/create new ones from inside the frame, and therefore, it loses it's inital purpose: simply to list the Contact associated with the Account. I want to replace it with a simple table that returns a list of Contacts (First Name and Last Name, Title, Email).

 

 

I discovered I could create my own little table with a basic list, and put it on the Account page to test the list generation (works perfectly). My issue is that this same code does not work when I set the Standard Controller to "Training__c". I'm brand-new to VF so I know I need to adjust my code so that the same list that generates on the Account appears on my Custom object. 

 

I appreciate your help and feedback; I am trying to learn!

 

 

My VF page that works on the Account page layout:

<apex:page standardController="Account" tabStyle="Contact" >
    <apex:pageBlock title="Contact List">
    <apex:dataTable value="{!account.Contacts}"
        var="contact"
        cellPadding="4" border="0.5">
        <apex:column >
            <apex:facet name="header">Full Name</apex:facet>
           <apex:outputText value="{!contact.FirstName} {!contact.LastName}" escape="false" />
            </apex:column>
        <apex:column >
            <apex:facet name="header">Title</apex:facet>
            {!contact.Title}
            </apex:column>
        <apex:column >
            <apex:facet name="header">Email</apex:facet>
            {!contact.Email}
            </apex:column>
        </apex:dataTable>
    </apex:pageBlock>
</apex:page>

 

 

 

 

My class:

public class mySecondController{

    public Account getAccount() {
        return [select id, name,
                (select id, firstname, lastname
                 from Contacts limit 20)
                from Account where id=
                :System.currentPageReference()
                .getParameters().get('id')];
    }
}

 

  • December 07, 2013
  • Like
  • 0

Hi, 

 

I have a custom object that I want it's master's Contact list (custom object master is Accounts) to appear on a VF page. I know how to get the webpage to appear in the visualforce page, but how to I get only the Contact related list, that shows in the browser after you click "Go To List", to appear (without sidebars, headers, tabs, footers, etc.)?

 

I have this:

<apex:page standardController="Training__c">
<apex:iframe src="/003?rlid=RelatedContactList&id={!Training__c.AccountID__c}" scrolling="true" id="theIframe"/>
</apex:page>

 

Which appears as the whole webpage, but I want it to display just the related list, without the salesforce headers, without the tabs, without the sidebar, without the footer.... just the table with the list.

 

How do I adjust my VFP to appear as I want?

 

 

  • May 14, 2013
  • Like
  • 0

Hi,

 

I have a custom number field on the account page that is counting the number of activities related to it's record.

 

My criteria is that the status must be marked as "Completed," but also that my Activity custom field, "Interaction Type" (Interaction_Type__c) be equal to the picklist value, "Visit," and that the Date field is in the current month. I can get as far as setting the criteria that the task status must be marked as Completed, and my custom field picklist value criteria, but the Date field respective to this month critieria, I am stuck on. 

 

Help?

 

Here is my current code, see below this with my notes inside the code of where I think it may go...

 

trigger UpdateLastMonthCompletedTasks on Task(after insert, after update){ASPIRAX.RelationHandler.invoke();
Account ac=[select id,Visits_this_Month__c from account where id=:trigger.new[0].whatid];
for (Task t: trigger.new)
If(trigger.new[0].status=='Completed')
{
if(t.Interaction_Type__c=='Visit')
{
if(Ac.Visits_this_Month__c == null)
Ac.Visits_this_Month__c =1;
else
Ac.Visits_this_Month__c +=1;
update ac;
}
}
}

 

 

 

DESIRED:

trigger UpdateLastMonthCompletedTasks on Task(after insert, after update){ASPIRAX.RelationHandler.invoke();
Account ac=[select id,Visits_this_Month__c from account where id=:trigger.new[0].whatid];
for (Task t: trigger.new)
If(trigger.new[0].status=='Completed')
{
if(t.Interaction_Type__c=='Visit')
{

t.Date==THISMONTH()
if(Ac.Visits_this_Month__c == null)
Ac.Visits_this_Month__c =1;
else
Ac.Visits_this_Month__c +=1;
update ac;
}
}

}
}

 

  • April 29, 2013
  • Like
  • 0

I have Find Nearby installed, and when I go to change the Mapping Address to "Do Not Map," it automatically changes back to Billing.

 

I have no Workflow Rules, Field Updates, or my own Triggers to change the field to BIlling.

 

 

What I have tried (simultaneouly)

1. Clearing out the Latitude field

2. Clearing out the Longitude field

3. Changing Mapping Status to [null]

4. Changing Mapping address to "Do Not Map"

 

AND

1. Clearing out the Latitude field

2. Clearing out the Longitude field

3. Changing Mapping Status to [null]

4. Changing Mapping Status to "Not Located Yet"

 

 

Does anyone know what is going on or how to fix this? I really like the "Do Not Map" checkbox on Leads, but the package doesn't have this for Accounts; I only see the option via "Mapping Address"

 

 

  • April 04, 2013
  • Like
  • 0

I have a VF page that is currently in the page layout under the standard "Lead Status" field in SF. I am replicating this field with a VF page that has the drop-down for edit directly in view, since we need our reps to easily change the Status field on their iPads (because in-line editing does not work on iPads). 

 

I need the VF page field name, the dropdown, and the save button all appear in one row, and have the field name directly line up to where all other left-hand column fields align in SF record pages. The VF page currently puts the start of the field name all the way at the edge of the record, unaligned with other field names.

 

What do I need to change to get this to align correctly, and appear all on one row?

 

Here is the VF page:

<apex:page standardcontroller="Lead" extensions="TestLeadCancel">
    <apex:form >
    <apex:outputPanel id="reloadPanel" rendered="{!reloadNeeded}" >
            <script type="text/javascript">
                // redirect the top level window
                window.top.location.href = '{!pageURL}';
            </script>   
        </apex:outputPanel>
        <h2>Lead Status</h2>
           <apex:inputhidden value="{!Lead.Id}"/>
           <apex:inputfield value="{!Lead.Status}"/>
           <apex:commandbutton value="Save" action="{!Save}"/>
    </apex:form>
</apex:page>

 

Here is the class:

public class TestLeadCancel {
    
    ApexPages.StandardController sc = null;
    Lead ld;
    
    public String pageUrl {set;}
    public Boolean reloadNeeded {get; set;}
      
    public TestLeadCancel(ApexPages.StandardController ctlr)  
    {  
       sc = ctlr;
       ld = (Lead) ctlr.getRecord();                 
    }  
    
    public String getPageUrl() {
        PageReference pr = new ApexPages.StandardController(ld).view();
        return pr.getUrl();
    }
             
    public PageReference save()  
    {  
        ld = (Lead) sc.getRecord();
        update ld;        
        reloadNeeded = true;
        return null;            
    }
    
    public PageReference cancel()
    {
        ld = (Lead) sc.getRecord();
        reloadNeeded = true;
        return null;        
    }      
}

 

  • October 10, 2012
  • Like
  • 0

I have a VisualForce page to Change the Lead Status, that is opened from the Lead Record page.

 

The idea is that instead of making someone on their mobile device have to click "Edit" and scroll to find the Lead Status field, and then save, we want them to be able to click a button at the top of the Lead record page that opens the VisualForce page with the one field, "Lead Status", that the user can change, and then by hitting the "Save" button, it returns them to the Lead record page with the new saved value

 

This would be great if we could create a Cancel button on the VF page that wouldn't save anything, and just return the user to the Lead record page.

 

I am a total newbie to VF, so I am not sure if there is some kind of Trigger or S-Control that needs to be created, and then added to this code?

 

I feel like this is probably something simple that someone out there could help me get working correctly (since it's one field to update).

 

Here is the VF page:

<apex:page standardcontroller="Lead">
    <apex:form >
    <a name="skiplink"><img src="/s.gif" height='1' width='1' alt="Content Starts Here" class="skiplink skipLinkTargetInner zen-skipLinkTarget" title="Content Starts Here"/></a><div class="bPageTitle"><div class="ptBody"><div class="content"><img src="/s.gif" alt="Lead"  class="pageTitleIcon" title="Lead"/><h1 class="pageType noSecondHeader">Change Status</h1><div class="blank">&nbsp;</div></div><div class="links"><a href="javascript&colon;openPopupFocusEscapePounds(%27/HelpAndTrainingDoor?loc=help&amp;target=leads_massaction.htm&amp;section=Leads%27, %27Help%27, 1024, 768, %27width=1024,height=768,resizable=yes,toolbar=yes,status=yes,scrollbars=yes,menubar=yes,directories=no,location=yes,dependant=no%27, false, false);" title="Help for this Page (New Window)"><span  class="helpLink">Help for this Page</span><img src="/s.gif" alt=""  class="helpIcon"/></a></div></div><div class="ptBreadcrumb"></div></div>
   <h1>Select New Status</h1>
   <apex:inputfield value="{!Lead.Id}"/>
   <apex:inputfield value="{!Lead.Status}"/>
   <apex:commandbutton value="Save" action="{!Save}"/> <apex:commandbutton value="Cancel" action="{!Cancel}"/>
    </apex:form>
</apex:page>

 

  • October 08, 2012
  • Like
  • 0

I created a VF page that needs to open from the Lead record; this is called Change Lead Status, and is meant to duplicate the "Change Lead Status" page that appears when you are on a view on the Tab, and you can select multiple records, click Change Lead Status, and upon save, it saves the status to the records you selected (it also returns you to the Lead tab).

 

I need the user to be able to:

1. Click the Custom Link "Change Lead Status" on the Lead Record page, and have a custom VF page open that only allows them to change the Lead Status.

2. Click save, and have this Lead Status they selected save to the record they came from. Upon save, be returned to the Lead record.

3. If click Cancel, return to the Lead record.

 

How do I do this?

 

So far, my page looks like this:

<apex:page standardcontroller="Lead">
<apex:form >
<a name="skiplink"><img src="/s.gif" height='1' width='1' alt="Content Starts Here" class="skiplink skipLinkTargetInner zen-skipLinkTarget" title="Content Starts Here"/></a><div class="bPageTitle"><div class="ptBody"><div class="content"><img src="/s.gif" alt="Lead" class="pageTitleIcon" title="Lead"/><h1 class="pageType noSecondHeader">Change Status</h1><div class="blank">&nbsp;</div></div><div class="links"><a href="javascript&colon;openPopupFocusEscapePounds(%27/HelpAndTrainingDoor?loc=help&amp;target=leads_massaction.htm&amp;section=Leads%27, %27Help%27, 1024, 768, %27width=1024,height=768,resizable=yes,toolbar=yes,status=yes,scrollbars=yes,menubar=yes,directories=no,location=yes,dependant=no%27, false, false);" title="Help for this Page (New Window)"><span class="helpLink">Help for this Page</span><img src="/s.gif" alt="" class="helpIcon"/></a></div></div><div class="ptBreadcrumb"></div></div>
<h1>Select New Status</h1>
<apex:inputfield value="{!Lead.Status}"/>
<apex:commandbutton value="Save" action="{!Save}"/> <apex:commandbutton value="Cancel" action="{!Cancel}"/>
</apex:form>
</apex:page>

  • October 01, 2012
  • Like
  • 0

How can we add a custom link on the Lead page layout that goes to the same "Change Status" page that appears when you try to change status' from a Lead tab view?

 

  • September 18, 2012
  • Like
  • 0

We have Marketo installed with Salesforce, and it has it's own tab with a visualforce page.


I created a custom HTML component for adding this VF page to the home page and my code is the following:

<iframe src="/apex/mkto_si__Dashboard?isdtp=lt" frameborder="0" height="900" width="1280"></iframe>

It loads, however, the background to the table rows changed from white to purple, and on hover, the table's rows changed from a light blue to white.

Is there something I need to define in the HTML component to make sure it appears in the VF's page's defined colors?

Here is a screen shot of how it appers in it's normal VF page (The second image, or the one at the bottom), and how it appears in the custom HTML component (the first image, or the one at the top).

 

  • September 14, 2012
  • Like
  • 0

Hi, 

 

I want to use a trigger to, upon save, the Lead's address will be sent to: https://tools.usps.com/go/ZipLookupResultsAction!input.action?resultMode=0&companyName=&address1=1600+Pennsylvania+Ave&address2=&city=Washington+DC&state=DC&urbanCode=&postalCode=&zip=20500

... (with the "address1" being the street field in Salesforce, "city" is city, "state" is State/Province, and "postalCode" is Zip/Postal Code in SF), and the website will return the +4 digits to the 5-digit zip code that was entered into SF.

 

Upon acquiring the result from this Website, the trigger needs to take the entire 9-digit code and replace the 5 figit code in salesforce with this value.

 

Is this something someone can easily create for me? :-)

  • September 10, 2012
  • Like
  • 0

I want to be able to perform a search to find all Accounts within a, say, 50 mile radius of a specified zipcode.

 

I have an excel sheet that has all zipcodes, and the respective lat/lng degrees of the "center" of the zipcode. Also, the excel list includes the city, state, and state abbreviation.

 

We also have Find Nearby installed, but I am unfamiliar with this, and if it can search by a radius, and produce a LIST, not a map, of the results.

 

It would be great if we could run a report or something (custom object?) to produce this list. Any ideas? 

 

I'm not sure if this would be an Apex code or not.

  • July 24, 2012
  • Like
  • 0

We are going to integrate three external programs related to Accounts in Salesforce:
1. Customer Locator (results on our website for people to find the companies)
2. Inventory Management
3. Event Management (people can sign up to attend our events such as workshops, conferences, trade shows, from  an outside source, and have it come back to Salesforce, as well as be able to signup in salesforce which will feedback to the Event management program).

Items 1 and 2 will be related for Accounts. Item 3 is related to Contacts (which is related to accounts).

If we get these integrated in Salesforce, do we have to do separate integration to have this available in the Portal? or can we simply provide portal access to the custom objects?

  • July 19, 2012
  • Like
  • 0

We have a web-to-lead form that sends the checkboxes marked "true" on the form, to mark the respective checkbox field on our Lead record as "true" (Lead Record type is called "Marketing").

 

We have these checkboxes field names, and API field names, respectively.

1. Friend |   Heard_About_Company_Through_Friend__c

2. Facebook |   Heard_About_Company_Through_Facebook__c

3. Google, Yahoo, Bing |   Heard_About_Company_Through_Goog_Yah_Bing__c

 

Our objective is to be able to create Matrix report with the first column summarized by the checkboxes marked as true, however, since they are all their own fields, for example, the first summary could only be Friend or Facebook or Google, Yahoo, Bing. Further, we want the "Total" number of records to count only unique Lead ID's (Lead records). Ideally, we would have used a multi-picklist field for capturing this from the web-to-lead form, but our developer experienced technical issues.

 

I was thinking maybe that we can create a multi-picklist field, called Heard About Company Through | Heard_About_Company_Through__c, and retrospectively, update the multi-picklist based on the checkboxes.

 

I was instructed that a basic workflow with field update would not work, and a Trigger could be appropriate.

 

Any one know how to create this trigger?

  • July 18, 2012
  • Like
  • 0
Hi,

I am trying to test the reason a trigger is firing for one account and not others that look similar. My trigger causes an error message to appear at the top of the page that looks exactly like a Validation Rule error. 

For the account with the error, I duplicated the account record, and duplicated the related object records that would cause other triggers to fire, but I am not receiving the error on the duplicated record.

Is there a way to have SF show me why the trigger is firing on the troublesome record?
  • April 11, 2014
  • Like
  • 1
Hi,

I was using HTML component in home page component for advance search functionality in Narrow (Left) Column of Home Layout. My HTML component was 
<script language="JavaScript" type="text/javascript"> 
function setFocusOnLoad() {} 
function submitSearchForm(){ 
var searchField = document.getElementById('advsearchfield'); 
document.advsrch.action = '/search/SearchResults?searchType=2&sen=0&setLast=1&str=' + encodeURIComponent(searchField.value); 
return true; 
} 

</script> 

<form name="advsrch" method="post" onsubmit="return submitSearchForm();"> 
<input class="searchTextBox" id="advsearchfield" maxlength="80" size="18" name="sbstr" />
<input class="btn" value=" Go! " type="submit" /> 
</form>


Now that component is not visible in Summer 15 org, so for the workaround I have created visualforce component and create VF page, below is my code of VF page
<apex:page > 

<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" /> 
<apex:includeScript value="{!$Resource.advSearch}"/> 

</apex:page>

advSearch.js (Static Resource) is
 
$(document).ready(function () { 
function setFocusOnLoad() {} 
function submitSearchForm(){ 
var searchField = document.getElementById('advsearchfield'); 
document.advsrch.action = '/search/SearchResults?searchType=2&sen=0&setLast=1&str=' + encodeURIComponent(searchField.value); return true; 
} 

$form = $("<form/>",{name:"advsrch"},{method:"post"},{onsubmit:"return submitSearchForm();"} ); 
$form.append('<input class="searchTextBox" id="advsearchfield" maxlength="80" size="18" name="sbstr" />'); 
$form.append('<input class="btn" value=" Go! " type="submit"/>'); 

$('body').append($form); });

After doing all the changes, I have found couple of issues 

1) Its not showing the blue container as it is now VF component. Requirement is to show the advance search text field and button in blue container just like other components.
2) Its not calling the function same way as it was before, now it refreshing the whole page   and not going link which I am providing. 

Not sure what am I missing or whats need to be done. Any help would be appreciated. Thanks much 

Hi,

 

My Custom Object is called Training (API is Training__c). This Custom Object's Parent in the Master-Detail relationship is Accounts.

 

I currently have a VF page that sits on the Custom Object that shows only the iFrame for the related Contact list, but it allows users to edit the Contacts/create new ones from inside the frame, and therefore, it loses it's inital purpose: simply to list the Contact associated with the Account. I want to replace it with a simple table that returns a list of Contacts (First Name and Last Name, Title, Email).

 

 

I discovered I could create my own little table with a basic list, and put it on the Account page to test the list generation (works perfectly). My issue is that this same code does not work when I set the Standard Controller to "Training__c". I'm brand-new to VF so I know I need to adjust my code so that the same list that generates on the Account appears on my Custom object. 

 

I appreciate your help and feedback; I am trying to learn!

 

 

My VF page that works on the Account page layout:

<apex:page standardController="Account" tabStyle="Contact" >
    <apex:pageBlock title="Contact List">
    <apex:dataTable value="{!account.Contacts}"
        var="contact"
        cellPadding="4" border="0.5">
        <apex:column >
            <apex:facet name="header">Full Name</apex:facet>
           <apex:outputText value="{!contact.FirstName} {!contact.LastName}" escape="false" />
            </apex:column>
        <apex:column >
            <apex:facet name="header">Title</apex:facet>
            {!contact.Title}
            </apex:column>
        <apex:column >
            <apex:facet name="header">Email</apex:facet>
            {!contact.Email}
            </apex:column>
        </apex:dataTable>
    </apex:pageBlock>
</apex:page>

 

 

 

 

My class:

public class mySecondController{

    public Account getAccount() {
        return [select id, name,
                (select id, firstname, lastname
                 from Contacts limit 20)
                from Account where id=
                :System.currentPageReference()
                .getParameters().get('id')];
    }
}

 

  • December 07, 2013
  • Like
  • 0

Hi, 

 

I have a custom object that I want it's master's Contact list (custom object master is Accounts) to appear on a VF page. I know how to get the webpage to appear in the visualforce page, but how to I get only the Contact related list, that shows in the browser after you click "Go To List", to appear (without sidebars, headers, tabs, footers, etc.)?

 

I have this:

<apex:page standardController="Training__c">
<apex:iframe src="/003?rlid=RelatedContactList&id={!Training__c.AccountID__c}" scrolling="true" id="theIframe"/>
</apex:page>

 

Which appears as the whole webpage, but I want it to display just the related list, without the salesforce headers, without the tabs, without the sidebar, without the footer.... just the table with the list.

 

How do I adjust my VFP to appear as I want?

 

 

  • May 14, 2013
  • Like
  • 0

I have a VisualForce page to Change the Lead Status, that is opened from the Lead Record page.

 

The idea is that instead of making someone on their mobile device have to click "Edit" and scroll to find the Lead Status field, and then save, we want them to be able to click a button at the top of the Lead record page that opens the VisualForce page with the one field, "Lead Status", that the user can change, and then by hitting the "Save" button, it returns them to the Lead record page with the new saved value

 

This would be great if we could create a Cancel button on the VF page that wouldn't save anything, and just return the user to the Lead record page.

 

I am a total newbie to VF, so I am not sure if there is some kind of Trigger or S-Control that needs to be created, and then added to this code?

 

I feel like this is probably something simple that someone out there could help me get working correctly (since it's one field to update).

 

Here is the VF page:

<apex:page standardcontroller="Lead">
    <apex:form >
    <a name="skiplink"><img src="/s.gif" height='1' width='1' alt="Content Starts Here" class="skiplink skipLinkTargetInner zen-skipLinkTarget" title="Content Starts Here"/></a><div class="bPageTitle"><div class="ptBody"><div class="content"><img src="/s.gif" alt="Lead"  class="pageTitleIcon" title="Lead"/><h1 class="pageType noSecondHeader">Change Status</h1><div class="blank">&nbsp;</div></div><div class="links"><a href="javascript&colon;openPopupFocusEscapePounds(%27/HelpAndTrainingDoor?loc=help&amp;target=leads_massaction.htm&amp;section=Leads%27, %27Help%27, 1024, 768, %27width=1024,height=768,resizable=yes,toolbar=yes,status=yes,scrollbars=yes,menubar=yes,directories=no,location=yes,dependant=no%27, false, false);" title="Help for this Page (New Window)"><span  class="helpLink">Help for this Page</span><img src="/s.gif" alt=""  class="helpIcon"/></a></div></div><div class="ptBreadcrumb"></div></div>
   <h1>Select New Status</h1>
   <apex:inputfield value="{!Lead.Id}"/>
   <apex:inputfield value="{!Lead.Status}"/>
   <apex:commandbutton value="Save" action="{!Save}"/> <apex:commandbutton value="Cancel" action="{!Cancel}"/>
    </apex:form>
</apex:page>

 

  • October 08, 2012
  • Like
  • 0

I want to be able to perform a search to find all Accounts within a, say, 50 mile radius of a specified zipcode.

 

I have an excel sheet that has all zipcodes, and the respective lat/lng degrees of the "center" of the zipcode. Also, the excel list includes the city, state, and state abbreviation.

 

We also have Find Nearby installed, but I am unfamiliar with this, and if it can search by a radius, and produce a LIST, not a map, of the results.

 

It would be great if we could run a report or something (custom object?) to produce this list. Any ideas? 

 

I'm not sure if this would be an Apex code or not.

  • July 24, 2012
  • Like
  • 0

I'm trying to create a workflow rule that triggers an approval process when the value of Picklist Field X changes from Old Value 'A' or Old Value 'B' to New Value 'C'.

 

Any help is appreciated.

 

 

Thanks,

Greg

Message Edited by gregarious on 03-03-2010 03:55 PM
Message Edited by gregarious on 03-03-2010 03:56 PM