• ShawnF
  • NEWBIE
  • 80 Points
  • Member since 2008
  • Technical Solution Architect
  • salesforce


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

Hello everyone!

 

I have a report, showed with Vertical Columns. Is there any way to order the columns? It's a mess!!

 

 

Thanks in advance!!

I am concerned about the way the META tags are displayed on our Force.com Site.

 

For example, do a View > Source on this particular page.

 

You will see the 'description' and 'keywords' META tags are present. However, the order in which the tag is written concerns me.

 

The tag in my vf page source code is written like this:

 

<meta name="description" content="...">

 

But when you View > Source on the page linked above, you will see that the meta tag is written in reverse, like this:

 

<meta content="..." name="description">

 

where the 'content' and 'name' attributes of my META tag are reversed from the way I have them written in my vf page source code.

 

You will see the same thing happens for the 'keywords' META tag.

 

Questions:

 

  1. Does anyone know why the attributes are written in reverse order?
  2. Is there any risk to them being in reverse order?
  3. Can I somehow correct this? If so, can you please explain how to do so?

My current employer, Digital Realty Trust, runs a portion of the corporate website as a Force.com Site; anything at (http://datacenters.digitalrealtytrust.com/) is a Force.com Site.

 

We also use Marketo as our “lead capture” system and I am trying to use a form script provided by Marketo on a Visualforce page to allow the end user to ‘request more information’.

 

So, here is what I’ve done:

 

  1. I build a simple vf test page in Sandbox (code provided below)
  2. I follow the instructions provided by Marketo (in their knowledge article)
  3. I complete the form
  4. I click the submit button
  5. I get the thank you page as expected
  6. Therefore, to the end user, it appears as though everything has worked correctly

Problem is: Marketo doesn’t register the form submit. When I look for the test data in Marketo, there is no activity regarding the form submit.

 

Are there known issues with using a third party form where I am forced to use the normal HTML <form></form> script instead of using the <apex:form></apex:form> syntax prescribed by Apex?

 

Here is my very simple vf page for reference. NOTE: I had to remove all the picklist options from the form below because this board said I was over the 20,000 character limit.

 

 

<apex:page standardController="Spec_Sheet__c">
<head>
<!-- SYSTEM JAVASCRIPT - DO NOT EDIT -->
<script type="text/javascript">
function fieldValidate(field) {
  /* call Mkto.setError(field, message) and return false to mark a field value invalid */
  /* return 'skip' to bypass the built-in validations */
  return true;
}
function getRequiredFieldMessage(domElement, label) {
  return "This field is required";
}
function getTelephoneInvalidMessage(domElement, label) {
  return "Please enter a valid telephone number";
}
function getEmailInvalidMessage(domElement, label) {
  return "Please enter a valid email address";
}
</script>
</head>

<form class="lpeRegForm formNotEmpty" method="post" enctype="application/x-www-form-urlencoded" action="http://info.digitalrealtytrust.com/index.php/leadCapture/save" id="mktForm_1042" name="mktForm_1042"><ul class='mktLblCenter'><li  class='mktFormReq mktField' ><label>First Name:</label><span class='mktInput'><input class='mktFormText mktFormString mktFReq' name="FirstName" id="FirstName" type='text' value=""  maxlength='255' tabIndex='1' /><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Last Name:</label><span class='mktInput'><input class='mktFormText mktFormString mktFReq' name="LastName" id="LastName" type='text' value=""  maxlength='255' tabIndex='2' /><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Company:</label><span class='mktInput'><input class='mktFormText mktFormString mktFReq' name="Company" id="Company" type='text' value=""  maxlength='255' tabIndex='3' /><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Email:</label><span class='mktInput'><input class='mktFormText mktFormEmail mktFReq' name="Email" id="Email" type='text' value=""  maxlength='255' tabIndex='4' /><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Phone:</label><span class='mktInput'><input class='mktFormText mktFormString mktFReq' name="MainPhone" id="MainPhone" type='text' value=""  maxlength='255' tabIndex='5' /><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Your Country:</label><span class='mktInput'><select class='mktFormSelect mktFReq' name="Country" id="Country" size='1'  tabIndex='6'><option value='' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>

<li  class='mktFormReq mktField' ><label>Company HQ Country:</label><span class='mktInput'><select class='mktFormSelect mktFReq' name="Company_HQ_Country__c" id="Company_HQ_Country__c" size='1'  tabIndex='7'><option value='' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>

<li  class='mktField' ><label>Company HQ State:</label><span class='mktInput'><select class='mktFormSelect' name="Company_HQ_State__c" id="Company_HQ_State__c" size='1'  tabIndex='8'><option value='Please choose...' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>

<li  class='mktFormReq mktField' ><label>Organization Level:</label><span class='mktInput'><select class='mktFormSelect mktFReq' name="Organization_Level__c" id="Organization_Level__c" size='1'  tabIndex='9'><option value='Please choose...' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Decision Timeframe:</label><span class='mktInput'><select class='mktFormSelect mktFReq' name="Timeframe__c" id="Timeframe__c" size='1'  tabIndex='10'><option value='Please choose...' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>

<li  class='mktField' ><label>Datacenter Size Need:</label><span class='mktInput'><select class='mktFormSelect' name="Size_Need__c" id="Size_Need__c" size='1'  tabIndex='11'><option value='Please choose...' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>
<li  class='mktField' ><label>Racks Required:</label><span class='mktInput'><select class='mktFormSelect' name="Racks_Required__c" id="Racks_Required__c" size='1'  tabIndex='12'><option value='Please choose...' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>

<li  class='mktField' ><label>Website Form Comments:</label><span class='mktInput'><textarea class='mktFormTextarea mktFormTextarea' name="Website_Form_Comments_del__c" id="Website_Form_Comments_del__c" cols='20' rows='2' tabIndex='13'></textarea><span class='mktFormMsg'></span></span></li>
<li  class='mktField' style="display: none;"><label>Property ID:</label><span class='mktInput'><input class='mktFormHidden' name="Property_ID__c" id="Property_ID__c" type='hidden' value="" /><span class='mktFormMsg'></span></span></li>
<li  class='mktField' style="display: none;"><label>Suite:</label><span class='mktInput'><input class='mktFormHidden' name="Suite__c" id="Suite__c" type='hidden' value="" /><span class='mktFormMsg'></span></span></li>
<li id='mktFrmButtons'><label>&nbsp;</label><input id='mktFrmSubmit' type='submit' style="width: auto; overflow: visible; padding-left: .25em; padding-right: .25em;" value='Submit' name='submitButton' onclick='formSubmit(document.getElementById("mktForm_1042")); return false;' />&nbsp;<input style='display: none;' id='mktFrmReset' type='reset' 
              value='Clear' name='resetButton' onclick='formReset(document.getElementById("mktForm_1042")); return false;' /></li>     
  </ul>
  <span style="display:none;"><input type="text" name="_marketo_comments" value="" /></span>
  <input type="hidden" name="lpId" value="-1" />
  <input type="hidden" name="subId" value="80" />
  <input type="hidden" name="kw" value="" />

  <input type="hidden" name="cr" value="" />
  <input type="hidden" name="searchstr" value="" />
  <input type="hidden" name="lpurl" value="http://info.digitalrealtytrust.com/DatacenterLocator.html?cr={creative}&kw={keyword}" />
  <input type="hidden" name="formid" value="1042" />
  <input type="hidden" name="returnURL" value="http://www.digitalrealtytrust.com/" />
  <input type="hidden" name="retURL" value="http://www.digitalrealtytrust.com/" />
  <input type="hidden" name="_mkt_disp" value="return" />
      <input type="hidden" name="_mkt_trk" value="" />
  </form>

<script type="text/javascript" src="http://info.digitalrealtytrust.com/js/mktFormSupport.js"></script>
<script type="text/javascript">
function formSubmit(elt) {
  return Mkto.formSubmit(elt);
}
function formReset(elt) {
  return Mkto.formReset(elt);
}
</script>

</apex:page>

 

 

Can someone provide a definition for the "External entry point" error message?

 

What is an "External entry point"?

 

Or, better yet, what are typical causes for the "External entry point" error message? And what are typical solutions to the "External entry point" error message?

  • November 17, 2010
  • Like
  • 0

In written english, what I am trying to accomplish is the following:

 

  • Build a visualforce page displaying details for a specific Property__c record
  • For that property, show a list on the page of related child Suite__c records where Status__c = 'Available'
  • For that property, show a list on the page of related child Spec_Sheet__c records where Property__c = 'the id of the property being viewed'
  • Use this visualforce page publically as part of a Force.com Site (meaning, users will not authenticate)

Here is my controller extension:

 

 

public class MyPropertyExtension {

Property__c prop;

public MyPropertyExtension(ApexPages.StandardController PropertyController) {
this.prop = (Property__c)PropertyController.getRecord();
}

public List<Suite__c> getSuiteRecords() {
return [Select s.id, s.Name, s.Status__c, s.Property__c, Total_Raised_Floor_sqft__c, KVA__c, kW_of_UPS__c, Available_PDU_Capacity_kW__c from Suite__c s Where (s.Status__c!= 'Leased') AND (s.Property__c =:ApexPages.currentPage().getParameters().get('id'))];
}

public List<Spec_Sheet__c> getSpecRecords() {
return [Select s.id, s.Name, s.Property__c, s.Suite__c from Spec_Sheet__c s Where (s.Suite__r.Status__c = 'Available') AND (s.Property__c =:ApexPages.currentPage().getParameters().get('id'))];
}
}

 

 

And here is what I have as my test class:

 

 

@isTest
private class TestMyPropertyExtension {

private final Property__c prop;

public TestMyPropertyExtension(ApexPages.StandardController PropertyController) {
this.prop = (Property__c)PropertyController.getRecord();
}

static testmethod void testGetSuitesPositive(){

// Create dummy data for test purposes.
// Always assume your org has no data because the record may not be there later.
Property__c p = new Property__c();
p.Name = 'foo';
System.debug('Inserting the test property record...');
insert p;

Suite__c sAvailable = new Suite__c();
sAvailable.Name ='bar';
sAvailable.Property__c = p.Id;
sAvailable.Status__C = 'Available';
System.debug('Inserting the test suite record with status = Available...');
insert sAvailable;

Suite__c sLeased = new Suite__c();
sLeased.Name ='bar';
sLeased.Property__c = p.Id;
sLeased.Status__c = 'Leased';
System.debug('Inserting the test suite record with status = Leased...');
insert sLeased;

// Use the vf page in my org named 'locatorDetails'
PageReference pageRef = Page.locatorDetails;
Test.setCurrentPage(pageRef);

// Set the id of the current vf page to a Property__c record that I know has child Suite__c and Spec_Sheet__c records
ApexPages.currentPage().getParameters().put('id', p.Id);
TestMyPropertyExtension controller = new TestMyPropertyExtension();

//Call controller.suiteRecords() and assert the list contains the expected records.
List<Suite__c> suiteRecords = controller.suiteRecords();

system.assertEquals(suiteRecords.size(),1);

for(Suite__c s: suiteRecords)
{
System.assertEquals('Available', s.Status__c);
System.assertEquals(sAvailable.Id, s.Id);
}
}

static testmethod void testGetSpecSheetsPositive(){
// Create dummy data for test purposes.
// Always assume your org has no data because the record may not be there later.
Property__c p = new Property__c();
p.Name = 'foo';
insert p;

Suite__c sAvailable = new Suite__c();
sAvailable.Name ='bar';
sAvailable.Property__c = p.Id;
sAvailable.Status__C = 'Available';
insert sAvailable;

Spec_Sheet__c spec = new Spec_Sheet__c();
spec.Name ='bar';
spec.Property__c = p.Id;
spec.Suite__c = sAvailable.Id;
insert spec;

// Use the vf page in my org named 'locatorDetails'
PageReference pageRef = Page.locatorDetails;
Test.setCurrentPage(pageRef);

// Set the id of the current vf page to a Property__c record that I know has child Suite__c and Spec_Sheet__c records
ApexPages.currentPage().getParameters().put('id', p.Id);
TestMyPropertyExtension controller = new TestMyPropertyExtension();

//Call controller.getSpecSheetLookup() and assert the list contains the expected records.
List<Spec_Sheet__c> specRecords = controller.specRecords();
system.assertEquals(specRecords.size(),1);
}
}

 

 

The error message I receive is:

 

 

Error: Compile Error: Constructor not defined: [TestMyPropertyExtension].<Constructor>() at line 39 column 46

 

 

Which has to do with this line in my test class:

 

 

TestMyPropertyExtension controller = new TestMyPropertyExtension();

 

 

I'm not certain why it is giving me a "constructor not defined" error message when I have the constructor at the top of my test class. Here:

 

 

private final Property__c prop;

public TestMyPropertyExtension(ApexPages.StandardController PropertyController) {
this.prop = (Property__c)PropertyController.getRecord();
}

 

Two questions:

 

  1. Can you tell me what the "constructor not defined" error message means, so that I can learn from this?
  2. Can you tell me what I am doing wrong at that particular line where I am receiving the error message?

I'm building a vf page that will show details of a parent object, and then iterate over a list of related child records that have a certain status (where status__c != 'Leased').

 

I'm looking for an explanation on how to use System.Assert in regards to the related list of child objects.

 

Meaning, I have a query method that should result in a list of related child records.

 

So...I write a testmethod that calls my query method.

 

When I call my query method and it returns a list how, then, do I use System.Assert to assert that my query method has returned the list I expect?

 

All the examples I have seen of System.Assert seem to check one value against another. In my case, I'm not checking one value against another, I just want to verify that the query method has returned a list of related child objects where status__c != 'Leased'.

 

If there are no related child records where status__c != 'Leased', that is fine. I just won't display anything out on the vf page - that section will just be blank. Likewise, I don't really care how many related child records are returned in the list either. Meaning, the query method could return 1 record in the list or it could return 100 records in the list. Doesn't matter.

 

Furthermore, I'm using the vf page as part of a Force.com Site. Since it is public, I'm not allowing any saving, updating or editing of either the parent record being viewed or the related child objects being viewed. The vf page is only intended to query the db for related child records (where status__c != 'Leased') and iterate over them on the vf page in read-only mode. No data manipulation happening.

I'm writing a visualforce page that has a lot of custom styles.

 

I added the standardStylesheets="false" attribute to my apex:page so as not to interfere with my custom styles.

 

When I did so, all of my apex:outputfields began rendering twice on the page.

 

Here is a screenshot.

 

Two questions:

  1. Does anyone know WHY this is happening?
  2. If so, do you have a solution to keep the "Text Area (Rich) " apex:outputfields from rendering twice?

NOTE: All outputfields I'm referencing in the screenshot above are the new "Text Area (Rich) " fields (which are listed as beta) on a custom object I've named "Spec Sheets".

  • April 14, 2010
  • Like
  • 0

I have the need for a formula field to do two things:

 

1. evaluate an expression that my user types in. example: ((2+2) * 6) / 3

 

2. store the actual formula the user typed in to another field, in the case the formula should be audited for accuracy.

 

The formula is different record to record (being used on the Contract standard object), thus the need for my user to type it in. Plus, I have to be able include the actual formula in a Report column for auditors.

  • August 27, 2009
  • Like
  • 0

My current employer, Digital Realty Trust, runs a portion of the corporate website as a Force.com Site; anything at (http://datacenters.digitalrealtytrust.com/) is a Force.com Site.

 

We also use Marketo as our “lead capture” system and I am trying to use a form script provided by Marketo on a Visualforce page to allow the end user to ‘request more information’.

 

So, here is what I’ve done:

 

  1. I build a simple vf test page in Sandbox (code provided below)
  2. I follow the instructions provided by Marketo (in their knowledge article)
  3. I complete the form
  4. I click the submit button
  5. I get the thank you page as expected
  6. Therefore, to the end user, it appears as though everything has worked correctly

Problem is: Marketo doesn’t register the form submit. When I look for the test data in Marketo, there is no activity regarding the form submit.

 

Are there known issues with using a third party form where I am forced to use the normal HTML <form></form> script instead of using the <apex:form></apex:form> syntax prescribed by Apex?

 

Here is my very simple vf page for reference. NOTE: I had to remove all the picklist options from the form below because this board said I was over the 20,000 character limit.

 

 

<apex:page standardController="Spec_Sheet__c">
<head>
<!-- SYSTEM JAVASCRIPT - DO NOT EDIT -->
<script type="text/javascript">
function fieldValidate(field) {
  /* call Mkto.setError(field, message) and return false to mark a field value invalid */
  /* return 'skip' to bypass the built-in validations */
  return true;
}
function getRequiredFieldMessage(domElement, label) {
  return "This field is required";
}
function getTelephoneInvalidMessage(domElement, label) {
  return "Please enter a valid telephone number";
}
function getEmailInvalidMessage(domElement, label) {
  return "Please enter a valid email address";
}
</script>
</head>

<form class="lpeRegForm formNotEmpty" method="post" enctype="application/x-www-form-urlencoded" action="http://info.digitalrealtytrust.com/index.php/leadCapture/save" id="mktForm_1042" name="mktForm_1042"><ul class='mktLblCenter'><li  class='mktFormReq mktField' ><label>First Name:</label><span class='mktInput'><input class='mktFormText mktFormString mktFReq' name="FirstName" id="FirstName" type='text' value=""  maxlength='255' tabIndex='1' /><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Last Name:</label><span class='mktInput'><input class='mktFormText mktFormString mktFReq' name="LastName" id="LastName" type='text' value=""  maxlength='255' tabIndex='2' /><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Company:</label><span class='mktInput'><input class='mktFormText mktFormString mktFReq' name="Company" id="Company" type='text' value=""  maxlength='255' tabIndex='3' /><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Email:</label><span class='mktInput'><input class='mktFormText mktFormEmail mktFReq' name="Email" id="Email" type='text' value=""  maxlength='255' tabIndex='4' /><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Phone:</label><span class='mktInput'><input class='mktFormText mktFormString mktFReq' name="MainPhone" id="MainPhone" type='text' value=""  maxlength='255' tabIndex='5' /><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Your Country:</label><span class='mktInput'><select class='mktFormSelect mktFReq' name="Country" id="Country" size='1'  tabIndex='6'><option value='' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>

<li  class='mktFormReq mktField' ><label>Company HQ Country:</label><span class='mktInput'><select class='mktFormSelect mktFReq' name="Company_HQ_Country__c" id="Company_HQ_Country__c" size='1'  tabIndex='7'><option value='' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>

<li  class='mktField' ><label>Company HQ State:</label><span class='mktInput'><select class='mktFormSelect' name="Company_HQ_State__c" id="Company_HQ_State__c" size='1'  tabIndex='8'><option value='Please choose...' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>

<li  class='mktFormReq mktField' ><label>Organization Level:</label><span class='mktInput'><select class='mktFormSelect mktFReq' name="Organization_Level__c" id="Organization_Level__c" size='1'  tabIndex='9'><option value='Please choose...' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>
<li  class='mktFormReq mktField' ><label>Decision Timeframe:</label><span class='mktInput'><select class='mktFormSelect mktFReq' name="Timeframe__c" id="Timeframe__c" size='1'  tabIndex='10'><option value='Please choose...' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>

<li  class='mktField' ><label>Datacenter Size Need:</label><span class='mktInput'><select class='mktFormSelect' name="Size_Need__c" id="Size_Need__c" size='1'  tabIndex='11'><option value='Please choose...' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>
<li  class='mktField' ><label>Racks Required:</label><span class='mktInput'><select class='mktFormSelect' name="Racks_Required__c" id="Racks_Required__c" size='1'  tabIndex='12'><option value='Please choose...' selected='selected'>Please choose...</option></select><span class='mktFormMsg'></span></span></li>

<li  class='mktField' ><label>Website Form Comments:</label><span class='mktInput'><textarea class='mktFormTextarea mktFormTextarea' name="Website_Form_Comments_del__c" id="Website_Form_Comments_del__c" cols='20' rows='2' tabIndex='13'></textarea><span class='mktFormMsg'></span></span></li>
<li  class='mktField' style="display: none;"><label>Property ID:</label><span class='mktInput'><input class='mktFormHidden' name="Property_ID__c" id="Property_ID__c" type='hidden' value="" /><span class='mktFormMsg'></span></span></li>
<li  class='mktField' style="display: none;"><label>Suite:</label><span class='mktInput'><input class='mktFormHidden' name="Suite__c" id="Suite__c" type='hidden' value="" /><span class='mktFormMsg'></span></span></li>
<li id='mktFrmButtons'><label>&nbsp;</label><input id='mktFrmSubmit' type='submit' style="width: auto; overflow: visible; padding-left: .25em; padding-right: .25em;" value='Submit' name='submitButton' onclick='formSubmit(document.getElementById("mktForm_1042")); return false;' />&nbsp;<input style='display: none;' id='mktFrmReset' type='reset' 
              value='Clear' name='resetButton' onclick='formReset(document.getElementById("mktForm_1042")); return false;' /></li>     
  </ul>
  <span style="display:none;"><input type="text" name="_marketo_comments" value="" /></span>
  <input type="hidden" name="lpId" value="-1" />
  <input type="hidden" name="subId" value="80" />
  <input type="hidden" name="kw" value="" />

  <input type="hidden" name="cr" value="" />
  <input type="hidden" name="searchstr" value="" />
  <input type="hidden" name="lpurl" value="http://info.digitalrealtytrust.com/DatacenterLocator.html?cr={creative}&kw={keyword}" />
  <input type="hidden" name="formid" value="1042" />
  <input type="hidden" name="returnURL" value="http://www.digitalrealtytrust.com/" />
  <input type="hidden" name="retURL" value="http://www.digitalrealtytrust.com/" />
  <input type="hidden" name="_mkt_disp" value="return" />
      <input type="hidden" name="_mkt_trk" value="" />
  </form>

<script type="text/javascript" src="http://info.digitalrealtytrust.com/js/mktFormSupport.js"></script>
<script type="text/javascript">
function formSubmit(elt) {
  return Mkto.formSubmit(elt);
}
function formReset(elt) {
  return Mkto.formReset(elt);
}
</script>

</apex:page>

 

 

I would like to make content workspace files available on a force.com site page ( for un-authenticated user). Is this possible ?

 

If the answer is yes, then where and how do I set content workspace permission for un-authenticated user. In the workspace permission menu, I do not see an option to include unauthenticated user for view permission.

I do not want to use cutomer portal or  partner portal for this purpose. Thanks !

  • April 03, 2011
  • Like
  • 0

A couple of questions here:

 

1)  Does this URL Rewriter class look functional?  I thought I read that I didn't necessarily need the second generateURL function, but I'm not sure.

 

 

global with sharing class myRewriter implements Site.UrlRewriter {

String VIP_PAGE = '/VIP/';
String VIP_VISUALFORCE_PAGE = '/VIP?id=';

global PageReference mapRequestUrl(PageReference
myFriendlyUrl){
String url = myFriendlyUrl.getUrl();
if(url.startsWith(VIP_PAGE)){
String name = url.substring(VIP_PAGE.length(),
url.length());

Lead ld = [select id from Lead where XUniqueSearchId__c =:
name LIMIT 1];

return new PageReference(VIP_VISUALFORCE_PAGE + ld.id);
}

return null;
}

global List<PageReference> generateUrlFor(List<PageReference>
mySalesforceUrls){

return null;
}

}

 

 

2) What should the test class for this consist of?

 

Thank you in advance for any assistance you may be able to provide!

Can someone provide a definition for the "External entry point" error message?

 

What is an "External entry point"?

 

Or, better yet, what are typical causes for the "External entry point" error message? And what are typical solutions to the "External entry point" error message?

  • November 17, 2010
  • Like
  • 0

Hi,

 

I have a custom controller called: MyController, I did 

Error: Unknown constructor 'MyController.MyController(ApexPages.StandardSetController controller)'.

 

On my controller code I have the following implementation of a simple constructor:

 

public class MyController {
    public Plan_Table__c table;
    public List <Table_Account__c> table_acc;
    public MyController() {
        table = null;
        table_acc = null;
    }

 

 

// some get and set APIs ....

...

...

...

}

 

Why do I keep getting this error when saving my tag file:

<apex:page standardStylesheets="false" sidebar="false" StandardController="Table_Account__c" Extensions="MyController" tabStyle="Account" recordSetVar="acc">

 

...

...

...

 

 

Thanks,

Guy

I'm writing a visualforce page that has a lot of custom styles.

 

I added the standardStylesheets="false" attribute to my apex:page so as not to interfere with my custom styles.

 

When I did so, all of my apex:outputfields began rendering twice on the page.

 

Here is a screenshot.

 

Two questions:

  1. Does anyone know WHY this is happening?
  2. If so, do you have a solution to keep the "Text Area (Rich) " apex:outputfields from rendering twice?

NOTE: All outputfields I'm referencing in the screenshot above are the new "Text Area (Rich) " fields (which are listed as beta) on a custom object I've named "Spec Sheets".

  • April 14, 2010
  • Like
  • 0

Hello everyone!

 

I have a report, showed with Vertical Columns. Is there any way to order the columns? It's a mess!!

 

 

Thanks in advance!!

I have the need for a formula field to do two things:

 

1. evaluate an expression that my user types in. example: ((2+2) * 6) / 3

 

2. store the actual formula the user typed in to another field, in the case the formula should be audited for accuracy.

 

The formula is different record to record (being used on the Contract standard object), thus the need for my user to type it in. Plus, I have to be able include the actual formula in a Report column for auditors.

  • August 27, 2009
  • Like
  • 0

Hello,

 

I know it seems like a dumb question but I'm trying to familiarize myself with testing apex code with apex language.  

 

I am unsure when to use system.assertequals(x,y), system.assert(condition) and system.assertnotequals(x,y) and I have noticed it being used quite a bit.  I've looked at the user guide and and this link http://wiki.developerforce.com/index.php/An_Introduction_to_Apex_Code_Test_Methods, but still require more of a plain english explanation on when and why these methods are used.

 

Can anyone help me on this.

 

Much thanks!

I'm trying to get a simple HelloWorld application working on my local machine using the FlexBuilder v3 Beta and the most recent SFC Flex Toolkit. I've followed the code exactly as documented in the samples found online,  various screencasts, and even in downloaded the samples. Now matter what I do, I get the following error in the login step:

[FaultEvent fault=[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"] messageId="274B3986-6992-1A79-1276-D7DF53D645C3" type="fault" bubbles=false cancelable=true eventPhase=2]

The login function I'm using is below:
    private function doLogin():void
    {
     var lr:LoginRequest = new LoginRequest();
     lr.username = "devlogin@blablabla.com";
     lr.password = "devloginpassword";
     lr.server_url = "http://www.salesforce.com/services/Soap/u/9.0";
     lr.callback = new AsyncResponder(loginResult, loginFault);
     conn.login(lr);
    }
What am I doing wrong?

Thanks for any help,

Mike