• charlie_v
  • NEWBIE
  • 125 Points
  • Member since 2008

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 20
    Replies

Hi ,

 

I am trying to create a sample visual page with recruitment application but when i try to show fields data from related list, I am getting the following error.

 

Error: Invalid field Job_application__r for SObject Position__c 

 

here is my code.

 

<apex:page standardController="Position__c" id="thePage">
<apex:form >
<apex:pageBlock >
<apex:pageMessages ></apex:pageMessages>
<apex:pageBlockButtons location="bottom">
<apex:commandButton action="{!save}" value="Save"></apex:commandButton>
<apex:commandButton action="{!cancel}" value="Cancel"></apex:commandButton>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<apex:inputField value="{!Position__c.Department__c}">
</apex:inputField>
<apex:inputField value="{!Position__c.Job_Description__c}">
</apex:inputField>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock>
<apex:pageblockTable value="{!Position__c.Job_application__r}" var="JA">
<apex:column value="{!JA.Candidate__c}">
</apex:column>
<apex:column value="{!JA.Candidate_Qualified__c}">
</apex:column>
</apex:pageblockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

OK guys ... I've spent an entire afternoon on this and have no clue ...

 

I'm customizing the Customer Portal.  I have created a .html file to load into the header so it calls the custom CSS.

 

Everything is working fine in Chrome, Firefox and Safari.

 

But IE8 refuses to acknowledge the external stylesheet, which is stored in Documents.  I've tried both relative URL's and normal URL's in the link tag ... neither work.

 

I can't find anything online about this.  Does anyone know?  I'm up against a deliverable deadline here and I'm starting to panic.  Help!

 

Here's the code:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"  >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Company Customer Portal</title>
<link rel="stylesheet" type="text/css" href="https://c.na2.content.force.com/servlet/servlet.FileDownload?file=01540000000Wuuk"/>
</head>

<body>
</body>

</html>

 

 

We are currently looking to hire a full-time Salesforce.com Administrator in our West Chicago, IL office.

 

This is an on-site position (cannot work remotely).  Certification not required, but definitely a plus.

 

If interested, please send your resume to careers@aspenms.com and put "Salesforce.com Administrator" in the subject line of the email.

 

Thank you.

Message Edited by charlie_v on 01-29-2010 10:24 AM

301 redirects are discussed in a thread here:

http://community.salesforce.com/sforce/board/message?board.id=sites&message.id=2051#M2051

 

But I'm still confused...

 

If there isn't a true "301 Redirect" solution, then how do we handle this?  Now everything that links to my old "default.aspx" page is invalid (not to mention all of the other old pages that are indexed in the search engines).

 

Surfing to my old home page "default.aspx" now (obviously) returns the FileNotFound page on my Force.com site, so...

 

Should I replace all of the code in the default FileNotFound page with the accepted solution in the thread mentioned above?

Hi there. 

 

This morning I finally got around to attaching the Site Robots.txt file to my site.  A quick check of Google Webmaster Tools verified it was there, and they were seeing it.

 

Unfortunately, I inadvertently set all user agents to Disallow instead of Allow.  So I made the correction, but now that change doesn't seem to be propagating to the web.  I've waited 45 minutes, and it's still not out on the web.  I've verified the change is correct using the "preview" button in my Sites configuration.

 

How long before the updated robots.txt file gets out on the web?

Hi there.

 

Found this code on the boards for a controller Extension and got it working ok, but am struggling with the test method.

 

How do I create a parent record and get it associated with the child record for the test ?? I think the relationship is messing me up ...

 

 

public class PostCommentExtension { public List<Headline_Comment__c> nhc {get; set;} private final Headline__c parHeadline; public PostCommentExtension(ApexPages.StandardController myController) { parHeadline=(Headline__c)myController.getrecord(); nhc = new List<Headline_Comment__c>(); Headline_Comment__c Comment = new Headline_Comment__c(); Comment.Headline__c = parHeadline.id; nhc.add(Comment); } public PageReference save() { insert nhc; PageReference home = new PageReference('/headlines_with_comments?id='+parHeadline.id); home.setRedirect(true); return home; } public PageReference cancel() { PageReference back = new PageReference('/headlines_with_comments?id='+parHeadline.id); back.setRedirect(true); return back; } }

 

 Does anyone have any code they can paste here so I can see how to get this running?  Sorry if this is basic ... Admin going on Developer and still learning.

 

Thank you.

Charlie

 

Is there a way to insert an image from Documents into an <apex:inputTextarea> field?

I've been trying all morning to get this unit test to work, and now after reading through posts have gotten myself totally confused.

 

Here's the controller:

 

public class HeadlineAndComments { List<Headline__c> headlines; public List<Headline__c> getHeadlines() { if(headlines == null) { headlines = [Select h.Number_of_Comments__c, h.Name, h.Most_Recent_Comment__c, h.Item__c, h.Id, h.Headline_Posted_Date__c, h.CreatedDate, (Select Comment_By__c, Email__c, Comment__c, Comment_Brief__c, Comment_Posted_Date__c, Comment_Date__c From Headline_Comments__r WHERE Post_to_Site__c = TRUE ORDER BY Name) From Headline__c h Where Id = :ApexPages.currentPage().getParameters().get('id')]; } return headlines; } }

 

Here's the unit test I've been working on.

 

public static testMethod void testHeadlineAndCommentsController() { // Create new Headline__c Headline__c h1 = new Headline__c(Name='Test Headline',Item__c='Test Item'); insert h1; // Get a page reference to our newly created headline PageReference pg1 = new PageReference('/apex/PublicHeadlinesWithComments4?id='+h1.Id); System.test.setCurrentpage(pg1); Headline__c h2 = new Headline__c(); ApexPages.standardController sc2 = new ApexPages.standardController(h2); HeadlineAndComments cn2 = new HeadlineAndComments(sc2);

 

I thought what I needed to do was:

  1. Create new Headline__c record
  2. Run the query
  3. Assert and see if the ID of the query match the ID of the record I just created

If the logic is correct, then I'm too ignorant on the syntax to understand how to actually get it to test the controller 'HeadlineAndComments'.

 

Help?

 

 

Does anyone have a code sample of a controller that pulls in SOQL of a child object, where the child object's records are related to the ID of the parent object currently displayed on the page?

 

This is what I have, but it's not working:

 

public class HeadlineWithCommentsController { Headline__c[] headline = [SELECT Id, Name, Item__c, (SELECT Id, Name, Comment__c, Comment_Brief__c, Comment_By__c, Email__c, Post_to_Site__c FROM Headline_Comments__r WHERE Post_to_Site__c = True) FROM Headline__c WHERE Id = :ApexPages.currentPage().getParameters().get('id')]; }

 

 

 

Can someone please help me with this? 

 

I have 2 custom objects:  Headline__c, and Headline_Comments__c.

 

Headline__c is the 'master' in a Master-Detail relationship with Headline_Comments__c.

 

When viewing a headline record, I want to show all associated comments.  But I need to filter the related list to return only those comments where "Post_to_Site__c" equals TRUE.

 

Here's the controller:

 

public class HeadlineCommentsController { Public Headline__c[] getHeadline(){ return [SELECT Id, Name, Item__c FROM Headline__c WHERE Id = :ApexPages.currentPage().getParameters().get('id')]; } Public Headline_Comment__c[] getHeadlineComments(){ return [SELECT Id, Name, Comment__c, Comment_Brief__c, Comment_By__c, Email__c, Post_to_Site__c FROM Headline_Comment__c WHERE Headline__r.ID = :ApexPages.currentPage().getParameters().get('id') AND Post_to_Site__c = True]; } }

 

Here's the VF page:

 

<apex:page Controller="HeadlineCommentsController"> <apex:pageBlock title="Comments" > <apex:repeat value="{!HeadlineComments}" var="each"> Posted by {!each.Comment_By__c} {!each.Comment__c} </apex:repeat> </apex:pageBlock> </apex:page>

 

The problem is, I can get the comments to show just fine, but when I try to expose any of the Headline fields in my VF page, something like

 

<apex:detail subject="{!Headline}" relatedList="false"> </apex:detail>

 

I keep getting the following error:

 

Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
 

I've checked all the security, and as the Admin I should have access to the VF Page, all the Objects, all the Fields, and the Apex class.

 

Can someone please point me in the right direction?  I'm not a coder by trade, so code samples would be appreciated.

 

Thank you.

 

 

 

 

 

I'm trying to insert an image using the image button on a text area field using <apex:inputTextarea richText="true"/>, but I can't seem to get it to work.

 

I've tried inputting the image URL every way I can think of, including the old standby of /servlet/servlet.FileDownload?file=...

 

Nothing seems to work.

 

Is it broken, or am I doing it wrong?

 

If it doesn't work, is there a way to attach a third party WYSIWYG editor to an <apex:inputTextarea> field so I can have the same functionality?

This is probably a dumb question, but I've been fiddling around with this for a while and can't figure it out...

 

I have some Visualforce Tabs with a nice color scheme and custom icons.

 

I want to reference those tab styles in my VF Sites page so the sectionHeader will pick up the color scheme and the icon...but I don't want tabs.

 

If I set showHeader="false" on my page to get rid of the tabs, the sectionHeader turns gray, and I lose the icon.

 

If I create a pageBlock and reference the tab style, and then put a sectionHeader within the pageBlock, I get the color scheme, but lose the icon.

 

If I create a sectionHeader before the pageBlock, the section header loses both the color scheme and the icon.

 

Is there a way to use a sectionHeader within a VF Sites page where the page showHeader="false" (because I don't want the tabs) but somewhere on the page reference the tab style so the sectionHeader picks up both the color scheme and the icons?

Hoping someone will have a good tip for this...

 

I have a custom object that I'm exposing on Sites.

 

Each record in the custom object has a screen shot image.  The custom object has approximately 200 records.

 

Question #1:  Are Static Resources the ONLY way to expose images in a VF Sites page?

 

If the answer is yes, then

 

Question #2: Does that mean every time I add a new record to my custom object, and that record includes a screen shot, I will need to update my static resource file before I can expose that image with the record on Sites?

 

 

Both of these pages work fine in the SF environment, but they won't work in Sites.  The first works fine in Sites, but the 2nd returns the "under construction" message.

 

I've checked and double-checked the public access settings.  Am I overlooking the obvious here somewhere?

 

Here's the first page.  This works fine in Sites.

 

 

<apex:page standardController="Sites__c" showHeader="true" sidebar="false" tabStyle="Sites__tab" recordSetVar="Sites__c"> <apex:pageBlock title="Database of Sites"> <table> <tr> <td style="width: 100%"> <apex:form id="sitesForm"> <apex:panelGrid columns="2"> <apex:outputLabel value="View: "> <apex:selectList value="{!filterId}" size="1"> <apex:actionSupport event="onchange" rerender="sitesListing"/> <apex:selectOptions value="{!listviewoptions}"> </apex:selectOptions> </apex:selectList> </apex:outputLabel> </apex:panelGrid> <apex:pageBlockSection title="Listing" collapsible="false"> <apex:pageBlockTable id="sitesListing" value="{!Sites__c}" columns="1" var="sites"> <apex:column > <apex:outputLink value="Public_Sites_Detail?id={!sites.id}" id="theLink">{!sites.name}</apex:outputLink> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection> <apex:panelGrid columns="2"> <apex:commandLink action="{!previous}">Previous</apex:commandLink> <apex:commandLink action="{!next}">Next</apex:commandLink> </apex:panelGrid> </apex:form> </td> <td> </td> </tr> </table> </apex:pageBlock> </apex:page>

 

 

 

 

 Here's the 2nd page.  Clicking a link in the first page (Public_Sites) should pull up the record in this 2nd page (Public_Sites_Detail) ... but instead you get the "under construction message":

 

 

<apex:page standardController="Sites__c" showHeader="true" sidebar="false" tabStyle="Sites__tab"> <apex:sectionHeader title="{!Sites__c.name}" /> <apex:pageBlock > <apex:pageBlockSection columns="2" showheader="false"> <apex:outputField value="{!Sites__c.Name}"/> <apex:outputField value="{!Sites__c.Rating__c}"/> </apex:pageBlockSection> <apex:pageBlockSection columns="1" showHeader="false"> <apex:outputField value="{!Sites__c.Description__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:page>

 

 

 

Is it possible to expose SFDC's 'Advanced Search', including filters, for one or more Custom Objects, in a Sites VF page?  -- Or do I need to custom-code something, similar to the 'Search for Activities' tab in the VolunteerForce sample app?

I've enabled Contact History on Contacts.

 

Adding the related list to a page layout works fine, and I can see the field tracking.

 

But when I try to call Contact History in my VF page, I keep getting the error

 

'ContactHistory' is not a valid child relationship name for entity Contact'

 

I've downloaded my WSDL, and sure enough, it looks like ContactHistory is its own object.  No matter what I try, I can't get this to work.  

 

Running the code by itself works -- it's only when you run the page against an actual Contact that it blows up.

 

Here's the code.  Any help would be appreciated.

<apex:page standardController="Contact" showHeader="true" tabStyle="contact" > <style> .activeTab {background-color: #56458c; color:white; background-image:none; font-family: Verdana; font-size: 11px;} .inactiveTab { background-color: lightgrey; color:black; background-image:none font-family: Verdana; font-size: 11px;} .fontSize {font-size: 12px;) </style> <apex:detail relatedList="true" title="true"/> <apex:tabPanel switchType="client" selectedTab="tabdetails" id="ContactTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab" contentClass="fontSize"> <apex:tab label="Activity History" name="ActivityHistory" id="tabActHist"> <apex:relatedList subject="{!contact}" list="ActivityHistories" /> </apex:tab> <apex:tab label="Open Activities" name="OpenActivities" id="tabOpenAct"> <apex:relatedList subject="{!contact}" list="OpenActivities" /> </apex:tab> <apex:tab label="Opportunities" name="Opportunities" id="tabOpp"> <apex:relatedList subject="{!contact}" list="Opportunities" /> </apex:tab> <apex:tab label="Notes and Attachments" name="NotesAndAttachments" id="tabNoteAtt"> <apex:relatedList subject="{!contact}" list="NotesAndAttachments" /> </apex:tab> <apex:tab label="Contact History" name="ContactHistory" id="tabContactHist"> <apex:relatedList subject="{!contact.histories}" list="ContactHistory" /> </apex:tab> </apex:tabPanel> </apex:page>

 


 

Since you can't create a Field Update and attach it to a Workflow Rule that will perform any action on a Multi select picklist field, is it possible to create a trigger that will accomplish the same thing?

 

We have Contact records that are shoved into Salesforce from an external system.  I need to copy the "title" of the new record into a multi picklist field.  

 

How on earth?

I have a list view button attached to a VF page.  It exports the selected items to Excel using the contentType for Excel feature.

 

It works fine, but after the file has been saved to Excel, the user is just sitting there with a big blank screen.

 

No matter how I set the button behavior (new window, existing with sidebars, etc) the result is always the same.

 

Is there any way to incorporate a return URL in my VF code?

 

<apex:page standardController="Account" recordSetVar="accounts" tabStyle="Account" cache="true" contentType="application/vnd.ms-excel#MyList.xls">
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlockTable value="{!selected}" var="acct">
<apex:column value="{!acct.name}"/>
<apex:column value="{!acct.type}"/>
<apex:column value="{!acct.Acct_Fax__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

The Visualforce Developer's Guide has a great example showing how to put an Account's details and related lists into tabs.

 

Does anyone know how to the same thing with Search Results?

 

I don't even know where to begin with this.  I've attached a screen shot...instead of one long, scrolling screen full of search results within each object (Accounts, Contacts, Leads, Opportunities...etc) does anyone know a way to transform this into a custom Visualforce page with tabs?  Including the available filters?

 

I apologize for the long image below, but it illustrates the point.  (Yes, if I could get my users to adopt proper search techniques, this wouldn't be necessary...but after three years, I've given up, and am looking for another solution).

 

Has someone already done this and posted the sample code somewhere?

 

Thank you,

Charlie

 


Search Results

Hi.  This is probably very basic, but I'm new to Apex and VF, and can't find this on the boards or documentation...

Our users will be accessing our new VF pages via a Custom Link on an Account's Detail Page.

The Apex class in the custom controller grabs the Account ID using the code:

Code:
where id = :ApexPages.currentPage().getParameters().get('id')];

But the problem is, when you click on the Custom Link on the Account Detail Page (and open VF page in existing window) the account id from the code above is no longer available.

How do I capture the account id prior to navigating away from the page?

Using a custom controller, I am selecting id, name, etc from Account where id = current page's accountid.  That seems to be working fine.

Next, I need to list all of the Contacts for the account in a drop-down list on my Apex page.  Once a user selects a Contact, I need to capture and store the contactid.

This is the error message I keep getting:  Compile Error: Constructor not defined: [System.SelectOption].<Constructor>(Id) at line 18 column 29

Here's my class code.  What am I doing wrong?  I lifted this from an example shown at http://forums.sforce.com/sforce/board/message?board.id=Visualforce&message.id=2344.

Code:
public class comboOppController {

    public Account getAccount() {
        return [select id, Name, Phone from Account
        where id = :ApexPages.currentPage().getParameters().get('id')];
    }
    
    public String selectedContact {get;set;}
    
    public List<SelectOption> contactList;
    
    public List<SelectOption> getContact () {
        if (contactList == null) {
            List<Contact> contactee = [select id, name, contact.accountid from Contact where contact.accountid = :ApexPages.currentPage().getParameters().get('id')];
            
        contactList = new List<SelectOption>();
        for (Contact c : contactee) {
            contactList.add(new SelectOption(c.id));
        }
    }
    return contactList;
    }

}

 

OK guys ... I've spent an entire afternoon on this and have no clue ...

 

I'm customizing the Customer Portal.  I have created a .html file to load into the header so it calls the custom CSS.

 

Everything is working fine in Chrome, Firefox and Safari.

 

But IE8 refuses to acknowledge the external stylesheet, which is stored in Documents.  I've tried both relative URL's and normal URL's in the link tag ... neither work.

 

I can't find anything online about this.  Does anyone know?  I'm up against a deliverable deadline here and I'm starting to panic.  Help!

 

Here's the code:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"  >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Company Customer Portal</title>
<link rel="stylesheet" type="text/css" href="https://c.na2.content.force.com/servlet/servlet.FileDownload?file=01540000000Wuuk"/>
</head>

<body>
</body>

</html>

 

 

I've created a pre-release developer sandbox to test out Winter '12 and have been working with Siteforce.

 

I'd like to experiment with exposing a Salesforce object (custom or standard) via Siteforce - I attended a demo at Dreamforce that did this exact thing. However, I can't see anyway to do this and the help has no information on this.

 

Can someone confirm if this feature is not in the current release or am I failing to spot the option somewhere.

We are seeking to increase our developer resources and am seeking those who have passed the certification exam or have the ability to do so.  Likewise we are also seeking to bring on one new certified consultant who has passed the consultant certification exam.

Hi there.

 

Found this code on the boards for a controller Extension and got it working ok, but am struggling with the test method.

 

How do I create a parent record and get it associated with the child record for the test ?? I think the relationship is messing me up ...

 

 

public class PostCommentExtension { public List<Headline_Comment__c> nhc {get; set;} private final Headline__c parHeadline; public PostCommentExtension(ApexPages.StandardController myController) { parHeadline=(Headline__c)myController.getrecord(); nhc = new List<Headline_Comment__c>(); Headline_Comment__c Comment = new Headline_Comment__c(); Comment.Headline__c = parHeadline.id; nhc.add(Comment); } public PageReference save() { insert nhc; PageReference home = new PageReference('/headlines_with_comments?id='+parHeadline.id); home.setRedirect(true); return home; } public PageReference cancel() { PageReference back = new PageReference('/headlines_with_comments?id='+parHeadline.id); back.setRedirect(true); return back; } }

 

 Does anyone have any code they can paste here so I can see how to get this running?  Sorry if this is basic ... Admin going on Developer and still learning.

 

Thank you.

Charlie

 

Is there a way to insert an image from Documents into an <apex:inputTextarea> field?

I've been trying all morning to get this unit test to work, and now after reading through posts have gotten myself totally confused.

 

Here's the controller:

 

public class HeadlineAndComments { List<Headline__c> headlines; public List<Headline__c> getHeadlines() { if(headlines == null) { headlines = [Select h.Number_of_Comments__c, h.Name, h.Most_Recent_Comment__c, h.Item__c, h.Id, h.Headline_Posted_Date__c, h.CreatedDate, (Select Comment_By__c, Email__c, Comment__c, Comment_Brief__c, Comment_Posted_Date__c, Comment_Date__c From Headline_Comments__r WHERE Post_to_Site__c = TRUE ORDER BY Name) From Headline__c h Where Id = :ApexPages.currentPage().getParameters().get('id')]; } return headlines; } }

 

Here's the unit test I've been working on.

 

public static testMethod void testHeadlineAndCommentsController() { // Create new Headline__c Headline__c h1 = new Headline__c(Name='Test Headline',Item__c='Test Item'); insert h1; // Get a page reference to our newly created headline PageReference pg1 = new PageReference('/apex/PublicHeadlinesWithComments4?id='+h1.Id); System.test.setCurrentpage(pg1); Headline__c h2 = new Headline__c(); ApexPages.standardController sc2 = new ApexPages.standardController(h2); HeadlineAndComments cn2 = new HeadlineAndComments(sc2);

 

I thought what I needed to do was:

  1. Create new Headline__c record
  2. Run the query
  3. Assert and see if the ID of the query match the ID of the record I just created

If the logic is correct, then I'm too ignorant on the syntax to understand how to actually get it to test the controller 'HeadlineAndComments'.

 

Help?

 

 

Does anyone have a code sample of a controller that pulls in SOQL of a child object, where the child object's records are related to the ID of the parent object currently displayed on the page?

 

This is what I have, but it's not working:

 

public class HeadlineWithCommentsController { Headline__c[] headline = [SELECT Id, Name, Item__c, (SELECT Id, Name, Comment__c, Comment_Brief__c, Comment_By__c, Email__c, Post_to_Site__c FROM Headline_Comments__r WHERE Post_to_Site__c = True) FROM Headline__c WHERE Id = :ApexPages.currentPage().getParameters().get('id')]; }

 

 

 

Can someone please help me with this? 

 

I have 2 custom objects:  Headline__c, and Headline_Comments__c.

 

Headline__c is the 'master' in a Master-Detail relationship with Headline_Comments__c.

 

When viewing a headline record, I want to show all associated comments.  But I need to filter the related list to return only those comments where "Post_to_Site__c" equals TRUE.

 

Here's the controller:

 

public class HeadlineCommentsController { Public Headline__c[] getHeadline(){ return [SELECT Id, Name, Item__c FROM Headline__c WHERE Id = :ApexPages.currentPage().getParameters().get('id')]; } Public Headline_Comment__c[] getHeadlineComments(){ return [SELECT Id, Name, Comment__c, Comment_Brief__c, Comment_By__c, Email__c, Post_to_Site__c FROM Headline_Comment__c WHERE Headline__r.ID = :ApexPages.currentPage().getParameters().get('id') AND Post_to_Site__c = True]; } }

 

Here's the VF page:

 

<apex:page Controller="HeadlineCommentsController"> <apex:pageBlock title="Comments" > <apex:repeat value="{!HeadlineComments}" var="each"> Posted by {!each.Comment_By__c} {!each.Comment__c} </apex:repeat> </apex:pageBlock> </apex:page>

 

The problem is, I can get the comments to show just fine, but when I try to expose any of the Headline fields in my VF page, something like

 

<apex:detail subject="{!Headline}" relatedList="false"> </apex:detail>

 

I keep getting the following error:

 

Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
 

I've checked all the security, and as the Admin I should have access to the VF Page, all the Objects, all the Fields, and the Apex class.

 

Can someone please point me in the right direction?  I'm not a coder by trade, so code samples would be appreciated.

 

Thank you.

 

 

 

 

 

Hi there. I am a new salesforce user, and currently trying to develop something for our sales team at the office. (banking/finance). I am an absolute noob, so my questions are probably quite dumb.., but here goes.

 

Using the Force.com free licence facility, I am setting up a reasonably simple sales platform for my colleagues & manager and have been able to configure users, and got my account & contact base up. The problem is, my first test user/colleague can log in, but i cant seem to set his home page & tabs etc to be the same as mine. How do I control his screen layouts etc to be uniform and thereby create a uniform system across my user base?

 

Any help will be welcome...

 

Cheers 

Hoping someone will have a good tip for this...

 

I have a custom object that I'm exposing on Sites.

 

Each record in the custom object has a screen shot image.  The custom object has approximately 200 records.

 

Question #1:  Are Static Resources the ONLY way to expose images in a VF Sites page?

 

If the answer is yes, then

 

Question #2: Does that mean every time I add a new record to my custom object, and that record includes a screen shot, I will need to update my static resource file before I can expose that image with the record on Sites?

 

 

Both of these pages work fine in the SF environment, but they won't work in Sites.  The first works fine in Sites, but the 2nd returns the "under construction" message.

 

I've checked and double-checked the public access settings.  Am I overlooking the obvious here somewhere?

 

Here's the first page.  This works fine in Sites.

 

 

<apex:page standardController="Sites__c" showHeader="true" sidebar="false" tabStyle="Sites__tab" recordSetVar="Sites__c"> <apex:pageBlock title="Database of Sites"> <table> <tr> <td style="width: 100%"> <apex:form id="sitesForm"> <apex:panelGrid columns="2"> <apex:outputLabel value="View: "> <apex:selectList value="{!filterId}" size="1"> <apex:actionSupport event="onchange" rerender="sitesListing"/> <apex:selectOptions value="{!listviewoptions}"> </apex:selectOptions> </apex:selectList> </apex:outputLabel> </apex:panelGrid> <apex:pageBlockSection title="Listing" collapsible="false"> <apex:pageBlockTable id="sitesListing" value="{!Sites__c}" columns="1" var="sites"> <apex:column > <apex:outputLink value="Public_Sites_Detail?id={!sites.id}" id="theLink">{!sites.name}</apex:outputLink> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection> <apex:panelGrid columns="2"> <apex:commandLink action="{!previous}">Previous</apex:commandLink> <apex:commandLink action="{!next}">Next</apex:commandLink> </apex:panelGrid> </apex:form> </td> <td> </td> </tr> </table> </apex:pageBlock> </apex:page>

 

 

 

 

 Here's the 2nd page.  Clicking a link in the first page (Public_Sites) should pull up the record in this 2nd page (Public_Sites_Detail) ... but instead you get the "under construction message":

 

 

<apex:page standardController="Sites__c" showHeader="true" sidebar="false" tabStyle="Sites__tab"> <apex:sectionHeader title="{!Sites__c.name}" /> <apex:pageBlock > <apex:pageBlockSection columns="2" showheader="false"> <apex:outputField value="{!Sites__c.Name}"/> <apex:outputField value="{!Sites__c.Rating__c}"/> </apex:pageBlockSection> <apex:pageBlockSection columns="1" showHeader="false"> <apex:outputField value="{!Sites__c.Description__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:page>

 

 

 

In the detail pages for Contacts Account and Opportunities there is a related list Activity History. It seems to only show the activities "assigned" to you. How can we make it show all activities for all users. The reasoning is that is it usefull for us to see if somebody else has an activity done or in progress for this account rather than stepping on their toes.

 

Thanks. 

Hi ,

 

I am trying to create a sample visual page with recruitment application but when i try to show fields data from related list, I am getting the following error.

 

Error: Invalid field Job_application__r for SObject Position__c 

 

here is my code.

 

<apex:page standardController="Position__c" id="thePage">
<apex:form >
<apex:pageBlock >
<apex:pageMessages ></apex:pageMessages>
<apex:pageBlockButtons location="bottom">
<apex:commandButton action="{!save}" value="Save"></apex:commandButton>
<apex:commandButton action="{!cancel}" value="Cancel"></apex:commandButton>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<apex:inputField value="{!Position__c.Department__c}">
</apex:inputField>
<apex:inputField value="{!Position__c.Job_Description__c}">
</apex:inputField>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock>
<apex:pageblockTable value="{!Position__c.Job_application__r}" var="JA">
<apex:column value="{!JA.Candidate__c}">
</apex:column>
<apex:column value="{!JA.Candidate_Qualified__c}">
</apex:column>
</apex:pageblockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

Using a custom controller, I am selecting id, name, etc from Account where id = current page's accountid.  That seems to be working fine.

Next, I need to list all of the Contacts for the account in a drop-down list on my Apex page.  Once a user selects a Contact, I need to capture and store the contactid.

This is the error message I keep getting:  Compile Error: Constructor not defined: [System.SelectOption].<Constructor>(Id) at line 18 column 29

Here's my class code.  What am I doing wrong?  I lifted this from an example shown at http://forums.sforce.com/sforce/board/message?board.id=Visualforce&message.id=2344.

Code:
public class comboOppController {

    public Account getAccount() {
        return [select id, Name, Phone from Account
        where id = :ApexPages.currentPage().getParameters().get('id')];
    }
    
    public String selectedContact {get;set;}
    
    public List<SelectOption> contactList;
    
    public List<SelectOption> getContact () {
        if (contactList == null) {
            List<Contact> contactee = [select id, name, contact.accountid from Contact where contact.accountid = :ApexPages.currentPage().getParameters().get('id')];
            
        contactList = new List<SelectOption>();
        for (Contact c : contactee) {
            contactList.add(new SelectOption(c.id));
        }
    }
    return contactList;
    }

}