• slane
  • NEWBIE
  • 50 Points
  • Member since 2008

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 29
    Questions
  • 49
    Replies

Hello all:

 

I've built a custom Force.com site for a customer. He was wanting to use a custom URL, but some conflicts with third-party App Exchange software so far have prevented this. Regardless, he wants his custom URL to forward/redirect to the site.

 

The custom domain is www.cbresa.com. The Site address is cbresa.force.com. He has configured a C record for www.cbresa.com, pointing to cbresa.force.com, via his ISP (GoDaddy). I've used nslookup to confirm that this record seems to be pointed correctly.

 

The problem occurs when I enter www.cbresa.com in my browser address bar. I end up at https://na6.salesforce.com. Spying on the traffic I can see this occurs via 302 redirect. I can't see whether that is coming from GoDaddy or from SFDC.

 

However, when I enter plain old cbresa.com into my browser, I do end up in the right place -- cbresa.force.com. THis happens via a couple funky 302 redirects (first to cbresa.com/?cf72abf0m then back to cbresa.com/), and finally a real 301 redirect. Oh, and if I put in http://cbresa.com/ with the trailing slash, I get the 301 redirect right away with the odd 302s in there.

 

Anway, mind-numbing HTTP detail aside, what are we doing wrong? Do we need to create a different type of DNS record on the ISP side? Do something on the SFDC side? Host a page on his ISP that forces the right redirect?

 

All thoughts welcome.

  • December 17, 2009
  • Like
  • 0

Hi all:

 

I'm really hoping someone can help me with this one.

 

I have a custom Force.com site with custom look and feel. In a nutshell, if a user is being compelled to change their password, this works fine in the sandbox. But if I do the same thing in production, where the site is being accessed, then once the user has submitted their new password and confirmation password, they get stopped dead by an Authorization Required page.

 

The technical details are kind of complex. I'll do my best to summarize them.

 

The site is fully authenticated, meaning that all content pages are meant to require login. The site home page is a customized login page with a customized controller. The login page header looks like this:

 

<apex: page id="ssLoginPage" showHeader="false" title="Special Servicer Login" controller="SS_LoginController" action="{!checkLoginStatus}">

 

The checkLoginStatus() method looks like this:

 

// this action method is meant to be called from the main login page
    public PageReference checkLoginStatus() {
        if( UserInfo.getUserType() == 'Guest' ) {
            return null;
        } else { // user is already logged in, we want to redirect them to loan list
            PageReference ref =  Page.SS_ViewLoanList;
            ref.setRedirect( true );
            System.debug( 'Already logged in! ' + ref );
            return ref;
        }
    }

 

 This is simply meant to redirect the user off the login page once they're logged in.

 

So here are the details of what happens:

 

In the sandbox:

  1. As an administrator, I reset a user's password
  2. Hit http://<mysite>.dev.cs0.force.com/SS and login with the new password I was emailed
  3. I get a customized Change Password screen with this URL:
    https://<mysite>.dev.cs0.force.com/SS/_ui/system/security/ChangePassword?retURL=%2FSS%2Fapex%2Fss_viewloanlist
  4. When I put in and confirm a new password, I get taken to the page SS_ViewLoanList, as I should

In production:

 

  1. As an administrator, I reset a user's password
  2. Hit http://<mysite>.force.com/SS and login with the new password I was emailed
  3. I get my customized Change Password at http://<mysite>.force.com/SS/_ui/system/security/ChangePassword?retURL=%2FSS%2Fapex%2Fss_viewloanlist. So far things look just like they did in the sandbox. On this screen I am displaying the user's profile and it says I have the profile of a logged-in user.
  4. When I put in and confirm a new password, I get stopped dead here:
    https://<mysite>.secure.force.com/SS/ChangePassword?refURL=http%3A%2F%2Fcbresa.force.com%2FSS%2Fsecur%2Ffrontdoor.jsp%3Fcshc%3D0000003INTI0000000ciE8%26portalId%3D060800000006CUy%26refURL%3Dhttp%253A%252F%252Fcbresa.force.com%252FSS%252Fsecur%252Ffrontdoor.jsp%26retURL%3D%252FSS%252Fapex%252Fss_viewloanlist%26sid%3D00D80000000ciE8%2521ARwAQBNTbuGEBd5o.4bMYhESU8yVHoTtcMVVE1TqykOWnce7Kl8_LxP2FzJ8JzSMyrtZ8C8VTKSnINtsypP8CWOD774GAIaP%26untethered%3D
  5. On this page, I am displaying the profile, and it shows me the profile not of a logged-in user but of the guest userfor this site!

It almost appears that, in Production, the user is getting logged out after submitting the changed password.

 

I should note that I granted the site's Guest user profile access to ALL VF pages in production and it did not help.

 

I know that's a lot of info? Any ideas? Many thanks for any insights.

Message Edited by slane on 11-30-2009 01:37 PM
  • November 30, 2009
  • Like
  • 0

Hello all:

 

I found, and worked around, an odd behavior. In a nutshell, I created a StandardSetController based on a QueryLocator. When the QueryLocator's underlying query returns zero records, attempting to set the controller's page set size causes an ugly exception. Worse, this happens in production, but not in my Enterprise sandbox.

 

Here's the original code:

 

con = new ApexPages.StandardSetController(Database.getQueryLocator(this.getQuery() ) );
con.setPageSize(15);

 

The query is specified by user input via a VisualForce page. When they specify a query that returns no results, then, again in Production, the following exception occurs:

 

(This is the styled VF error from my page).

 

I have verified that it's specifically the second line of code that causes the crash.

 

The above query looks like a query that underlies one of the reports elsewhere in the system.

 

I fixed this by commenting out the offending line and leaving the set size as the default, which works fine. But why would this happen, and why only in production? Should I be reporting this as a possible platform bug?

  • November 25, 2009
  • Like
  • 0

All:

 

I'm finding a serious problem in a site that needs to go live soon. The site is fully-authenticated, so users must log in to see any functionality.

 

When we create a new Customer Portal user for use with the site, they receive their username and initial password. When they log in with those credentials they are taken, correctly, to the Change Password page (where I've customized the look and feel to match the overall site branding).

 

They can put in a new password, but when they submit it they are taken instead to the Authorization Required page and invited to log in or register. Entering their old user/pw just takes them back through the loop to the Change Pasword page again.

 

I've checked Apex class permissions, VF page permissions, profile permissions, and nothing seems to be out of whack.

 

Any ideas? I'm stumped, and my customer is eager to roll out the site. Many thanks for any input.

 

  • November 24, 2009
  • Like
  • 0

Hello all:

 

I have a site, and I have it mapped to the path /SS/. In other words, in my sandbox, the URLs all begin with http://mydomain.dev.cs0.force.com/SS/. This comes about because I filled in a suffix for the "default" web address when setting up the site.

 

In production, I have a custom domain set up. So the site is intended to appear at www.mydomain.com. The user can log in fine, but when they try to navigate the site, the internal links are pointing to www.mydomain.com/SS/somepage. These pages aren't getting found.

 

I wonder if the problem is because I am using the /SS/ prefix in my internal links, and when constructing PageReference objects. Should I not be doing that? Should I be doing something like PageReference.Somepage instead?

 

I guess the other thing I find puzzling is that it would appear that if you use a custom domain the suffix you specified isn't preserved -- is that the case?

 

Anyway, my bigger concern is how to construct the internal links so the site is portable.

  • November 14, 2009
  • Like
  • 0

Hello all:

 

So here' s my situation. I have a custom site, with custom look and feel. It's fully authenticated, such that a user must log in in order to see any pages, as described here:

 

http://community.salesforce.com/sforce/board/message?board.id=sites&message.id=1463&query.id=176741#M1463

 

Ideally, if a user tries to access a restricted page when not logged in, they'll be redirected to my customized login page. But that's not what happens. They are instead sent to the Unauthorized page, which has standard Force.com Sites look and feel.

 

So, first I tried to reset what the site's "unauthorized" page is. But unlike the site template, active home page or inactive home page, there seems to be no way to reset what the "unauthorized" page is.

 

So instead I tried to make the Unauthorized page automatically redirect to my login page -- I created a custom controller, added it to the Unauthorized page, and set an action attribute on the page to call a controller method that would cause a redirect, by returning a PageReference to my custom login page. No dice: instead, I mysteriously get the "Under Construction" page when I do this. When I look at the HTTP traffic I don't see any redirect, all I see is a 503 Service Unavailable.

 

I suppose I could restyle the Unauthorized page to look like my custom login page. But why should I have to?

 

I'm really not sure where to start. Questions:

 

  1. What governs which page counts as the "unauthorized" page for a site? Is the page Id? The page name?
  2. How do I force the Unauthorized page to simply and always redirect to my login page?
  • November 11, 2009
  • Like
  • 0

Hello all:

 

I'm trying to get together a succinct article on how to set up authenticated access to Force.com Sites. The standard article from SFDC on this is quite good, but I think I can shed some additional light. That is, if I can get some questions answered :-)

 

Sites authentication uses Customer Portal licenses. It would appear from my experiments that the "default" customer portal license is called "Customer Portal Manager Standard." When I enable Customer Portal and Sites in a production org, this is what I get sold (when I buy licenses and don't ask for anything special).

 

Am I right in thinking this is somehow the "default" customer portal license? And is there a comprehensive list of portal license types, customer and/or partner, anywhere?

 

Thanks for any guidance on this.

  • October 27, 2009
  • Like
  • 0

Hello all:

 

I'm struggling to define some basic HTML elements in my VF pages. Note that all my pages are showHeader=false.

 

The first of these is "title". Though I have added a "title" attribute to my apex:page element, no <title> tags appear in the page when I view it in a browser, and the displayed page title is just the URL.

 

Secondly, <body>. VF doesn't seem to be emitting <body> tags. Is that my responsibility? I can include them in my site template, just wondered if this is a known issue. Wondering whose job this is, in effect.

 

Similar issue for <head> tags. Here VF DOES emit these. This perpetuates my confusion about who's on the hook for outputting these basic elements, me or VF. If VF will construct the <head> that's great, but then my question is, how do I insert my own elements in the <head>?

 

No doubt this is straightforward, but I haven't spotted the answer yet. 

  • October 27, 2009
  • Like
  • 0

Hello all:

 

I've created a VisualForce page to display a paginated record set. I'm using a StandardSetController. Here's what's odd.

 

 

ApexPages.StandardSetController con = new ApexPages.StandardSetController(Database.getQueryLocator( someQuery ) );
System.debug( 'Record set size is ' + con.getResultSize() );

 

 What  have found to be so, I think, is that if someQuery returns NO records, the controller instead finds ALL records in the target table! So though con.getResultSize() should be zero (I would think) if the query returns no records, instead it's equal to the size of all rows in the target table!

 

So far I have to do a count() query before the fact in order to decide whether even to instantiate the controller.

 

It's hard to imagine such an obvious bug got through; it's also hard to imagine this is intended behavior.

 

Has anyone else seen this?

 

  • October 16, 2009
  • Like
  • 0

Hello all:

 

I've having some trouble tracing errors that are appearing in my VisualForce pages. For whatever reason, I'm not seeing these errors in the debug logs. I can output the error message in my page, but nothing about the component, line of code etc.

 

Is there a way for me to grab and output the stack trace?

 

 

  • October 13, 2009
  • Like
  • 0

Hello all:

 

I imagine this is basic, but I'm wondering what the best practice is for send an email to all members of a public Group -- preferably from Apex but I'm interested to know if there are other ways as well. I can certainly take the steps of querying the group for its members, pulling them back and sending an email to them -- just wondering if there's a better way.

  • October 13, 2009
  • Like
  • 0

Has anyone else noticed that line number scrolling broken in Eclipse 3.4 on Mac OS? I did read one blog post that identifies the issue. This makes it EXTREMLY hard to track down errors by line number. Eclipse 3.5 is rumored to work fine.

 

Can anyone comment on when the Force.com IDE might work with Eclipse 3.5?

  • October 11, 2009
  • Like
  • 0

Hi all:

 

I'm having a problem seeing errors that are arising in my VF pages.

 

I am using templating, so I have a template, an apex:composition tag, and an apex:define. In my particular case, the header areas of my template come out fine, but one particular apex:define worth of content is never rendered.

 

I'm sure I know why. Some of the code executed to generate that content is throwing exceptions. In fact I know just what the error is -- some of the getters in the VF code are accessing properties that were never queried for in SOQL -- so I might have {Loan__c.Address} in my VF, but until I add that to my query, the page content just disappears, presumably due to this error.

 

My problem is, I figured this out by trial and error. I don't know how to see the exception. What I don't understand is why it doesn't appear in the debug log. But in the debug log, execution appears to silently stop when the offending code is hit.

 

I know how, in a controller, to catch an exception and display it in the page. But this error is happening on a "hard-wired" code path -- I wouldn't even know where to put a try/catch. What I want is for the VF page to show me the error, the way it does in a VF page that I access via a Salesforce URL, that uses a regular SFDC look and feel.

 

The latter may provide clues -- I am using an entirely custom look, with no pageBlock-style components, and I am accessing the page via Force.com Sites. But even when I access it as /apex/<pageName>, I get the same thing -- blank content area with no clue as to error.

 

I'm sure I'm missing something very simple. Any ideas?

  • October 10, 2009
  • Like
  • 0

Hi all:

 

I have a custom Site, using pure VF with all the headers turned off. It's desired to allow the users access to Documents (and this has been configured on the security side).

 

With the header turned off, we lose the Documents tab.

 

Any straightforward way to let my users "back into" the Documents area?

  • October 07, 2009
  • Like
  • 0

Hi all:

 

I am building a completely customized, authentication-only site. After some work, I've managed to set it up so that users must authenticate, and when they do they're taken to the site's landing page, a custom VF page.

 

The problem is, I still have what I'll call the "customer portal wrapper" around the page -- it has the customer portal CSS, and the tabs for Home, Case, Solutions, Reports, Documents, as well as the sidebar.

 

I want all that to disappear. Basically I want the page to appear exactly as it does when I access it directly in my org.

 

What do I need to turn on or off to accomplish this?

 

Thanks.

  • October 07, 2009
  • Like
  • 0

I'm sure I can figure this out for myself eventually, but thought someone might have a quick tip.

 

I have a VF page that shows the results of a custom SOQL query, in pages. Right now I'm hard-coding the query but I want to provide the user a few search fields across the top of the list. A small form with five fields corresponding to the list columns, in a row, with Search and Clear buttons at the end.

 

My question is, how best to lay out this little form in VF? So far I have a pageBlockSection, with pairs of outputLabel and inputText thrown into it, but they seem to lay out sparsely/randomly.

 

Would some of the "panel" components be better?

 

Thanks for any advice.

Message Edited by slane on 10-02-2009 04:12 PM
  • October 02, 2009
  • Like
  • 0

We have some customers who are interested in centralizing some data on Force.com and running their public web sites on Sites. But it's essential that we preserve their hard-won SEO rankings. I have heard rumblings that Sites is too new to be very SEO friendly. For example, no capacity for "friendly" URLs:

 

http://ideas.salesforce.com/article/show/10093787/URL_Rewrites_for_Salesforce_Sites

 

I believe, since we'd be modifying their link structures, we'd also need to set up some 301 redirect maps, normally accomplished with things like an Apache .htaccess file. I see nothing that says Sites will allow us to configure 301 redirects -- will it?

 

Some folks in sales with whom I've spoken admitted that Sites was "too new" for them even to know where to begin in answering my questions on this. But, as a partner, it's ESSENTIAL that I steer my customers on a good path.

 

Can anyone shed any light at all on these issues?

 

-- SGL

  • August 05, 2009
  • Like
  • 0

Hi all:

 

I have a customer for whom it would seem to make sense to move their existing, mostly static, web site to Sites. The site has about 50 pages that for the sake of argument are purely static HTML/CSS, maybe a little Javascript. It has maybe 8-10 pages that will draw on significant dynamic content. He'd like to be able to edit the static content himself to the extent possible. He is willing and tech-savvy.

 

Two questions:

 

1) What's the best way to handle the static HTML pages in Visual Force? Upload and manage as static resources?

2) Any way to let my customer use a tool like Adobe Contribute to edit his static content directly, or can that only be done via the web UI and/or the Force.com IDE?

 

Thanks in advance for all feedback.

 

-- SGL

  • July 20, 2009
  • Like
  • 0

This is something I struggle with a lot, to the extent that I wonder if I'm approaching it wrong.

 

Suppose I have a custom object like Job_Application__c and I get an instance from the database:

 

Job_Application__c[] appList = [ select Id, Name, Date_Submitted__c from Job_Application__c];
Job_Application__c theApp = appList[0];
theApp.Date_Evaluate_By__c = theApp.Date_Submitted__c + 7;

 


 

In my experience, when theApp.Date_Submitted__c is null, this code gives a null pointer exception. To me this is flabbergasting. A null value in a field isn't an error or exceptional case. It happens all the time.

 

As a result, in our code, we have to test each and every field reference to determine if it's null before using it.

 

Is this considered normal behavior and practice in Apex programming, or have we missed something?

  • March 28, 2009
  • Like
  • 0

Hello all:

 

I've been using the PHP toolkit to do some API work. My question is, how do I control the instance of salesforce to which my code tries to log in? If I create a SOAPClient from my Enterprise WSDL, everything works fine -- it logs me into my development org. But how do I connect to my customer's org without grabbing their WDSL as well? I assume this can be done because apps like the Eclipse IDE happily connect to multiple orgs via the API without needing all the WSDLs (or so it seems).

 

Can anyone point me in the right direction?

  • March 28, 2009
  • Like
  • 0

Hello all:

 

I've built a custom Force.com site for a customer. He was wanting to use a custom URL, but some conflicts with third-party App Exchange software so far have prevented this. Regardless, he wants his custom URL to forward/redirect to the site.

 

The custom domain is www.cbresa.com. The Site address is cbresa.force.com. He has configured a C record for www.cbresa.com, pointing to cbresa.force.com, via his ISP (GoDaddy). I've used nslookup to confirm that this record seems to be pointed correctly.

 

The problem occurs when I enter www.cbresa.com in my browser address bar. I end up at https://na6.salesforce.com. Spying on the traffic I can see this occurs via 302 redirect. I can't see whether that is coming from GoDaddy or from SFDC.

 

However, when I enter plain old cbresa.com into my browser, I do end up in the right place -- cbresa.force.com. THis happens via a couple funky 302 redirects (first to cbresa.com/?cf72abf0m then back to cbresa.com/), and finally a real 301 redirect. Oh, and if I put in http://cbresa.com/ with the trailing slash, I get the 301 redirect right away with the odd 302s in there.

 

Anway, mind-numbing HTTP detail aside, what are we doing wrong? Do we need to create a different type of DNS record on the ISP side? Do something on the SFDC side? Host a page on his ISP that forces the right redirect?

 

All thoughts welcome.

  • December 17, 2009
  • Like
  • 0

Hi all:

 

I'm really hoping someone can help me with this one.

 

I have a custom Force.com site with custom look and feel. In a nutshell, if a user is being compelled to change their password, this works fine in the sandbox. But if I do the same thing in production, where the site is being accessed, then once the user has submitted their new password and confirmation password, they get stopped dead by an Authorization Required page.

 

The technical details are kind of complex. I'll do my best to summarize them.

 

The site is fully authenticated, meaning that all content pages are meant to require login. The site home page is a customized login page with a customized controller. The login page header looks like this:

 

<apex: page id="ssLoginPage" showHeader="false" title="Special Servicer Login" controller="SS_LoginController" action="{!checkLoginStatus}">

 

The checkLoginStatus() method looks like this:

 

// this action method is meant to be called from the main login page
    public PageReference checkLoginStatus() {
        if( UserInfo.getUserType() == 'Guest' ) {
            return null;
        } else { // user is already logged in, we want to redirect them to loan list
            PageReference ref =  Page.SS_ViewLoanList;
            ref.setRedirect( true );
            System.debug( 'Already logged in! ' + ref );
            return ref;
        }
    }

 

 This is simply meant to redirect the user off the login page once they're logged in.

 

So here are the details of what happens:

 

In the sandbox:

  1. As an administrator, I reset a user's password
  2. Hit http://<mysite>.dev.cs0.force.com/SS and login with the new password I was emailed
  3. I get a customized Change Password screen with this URL:
    https://<mysite>.dev.cs0.force.com/SS/_ui/system/security/ChangePassword?retURL=%2FSS%2Fapex%2Fss_viewloanlist
  4. When I put in and confirm a new password, I get taken to the page SS_ViewLoanList, as I should

In production:

 

  1. As an administrator, I reset a user's password
  2. Hit http://<mysite>.force.com/SS and login with the new password I was emailed
  3. I get my customized Change Password at http://<mysite>.force.com/SS/_ui/system/security/ChangePassword?retURL=%2FSS%2Fapex%2Fss_viewloanlist. So far things look just like they did in the sandbox. On this screen I am displaying the user's profile and it says I have the profile of a logged-in user.
  4. When I put in and confirm a new password, I get stopped dead here:
    https://<mysite>.secure.force.com/SS/ChangePassword?refURL=http%3A%2F%2Fcbresa.force.com%2FSS%2Fsecur%2Ffrontdoor.jsp%3Fcshc%3D0000003INTI0000000ciE8%26portalId%3D060800000006CUy%26refURL%3Dhttp%253A%252F%252Fcbresa.force.com%252FSS%252Fsecur%252Ffrontdoor.jsp%26retURL%3D%252FSS%252Fapex%252Fss_viewloanlist%26sid%3D00D80000000ciE8%2521ARwAQBNTbuGEBd5o.4bMYhESU8yVHoTtcMVVE1TqykOWnce7Kl8_LxP2FzJ8JzSMyrtZ8C8VTKSnINtsypP8CWOD774GAIaP%26untethered%3D
  5. On this page, I am displaying the profile, and it shows me the profile not of a logged-in user but of the guest userfor this site!

It almost appears that, in Production, the user is getting logged out after submitting the changed password.

 

I should note that I granted the site's Guest user profile access to ALL VF pages in production and it did not help.

 

I know that's a lot of info? Any ideas? Many thanks for any insights.

Message Edited by slane on 11-30-2009 01:37 PM
  • November 30, 2009
  • Like
  • 0

I have started learning about visual force and the use of Sites. I just created my first VF page to capture data into a custom object. My question is this,  can sites be used to capture data into a custom object without the need for a user license?

 

I'm trying to replicate the Web to case type functionality but capture data into a custom object.  So far I've created a simple visual force page which capture a few fields, but when when I test the sites link it says I need to login first.

 

Any ideas?

 

- Janine

 

 

  • November 30, 2009
  • Like
  • 0

Hello.

 

Why is the UnderConstruction page not listed in the "Pages" section (App Setup / Develop / Pages)?

 

To get to it I have to click on Sites, then edit my site, then save my site (weird). And then I get to a list that contains UnderConstruction.

 

Thanks!

David F.

Hello all:

 

I found, and worked around, an odd behavior. In a nutshell, I created a StandardSetController based on a QueryLocator. When the QueryLocator's underlying query returns zero records, attempting to set the controller's page set size causes an ugly exception. Worse, this happens in production, but not in my Enterprise sandbox.

 

Here's the original code:

 

con = new ApexPages.StandardSetController(Database.getQueryLocator(this.getQuery() ) );
con.setPageSize(15);

 

The query is specified by user input via a VisualForce page. When they specify a query that returns no results, then, again in Production, the following exception occurs:

 

(This is the styled VF error from my page).

 

I have verified that it's specifically the second line of code that causes the crash.

 

The above query looks like a query that underlies one of the reports elsewhere in the system.

 

I fixed this by commenting out the offending line and leaving the set size as the default, which works fine. But why would this happen, and why only in production? Should I be reporting this as a possible platform bug?

  • November 25, 2009
  • Like
  • 0
If creating batch apex scripts will i run into governor limits if i do some complex processing i.e. for accounts get a list of opportunities and contacts, aggregate something on each account and update the accounts, opportunities and contacts etc..

Hi Guys,

I have a page on my force.com sites. One of page has a problem:

 

try
            {
                chargeResult = ChargentSFA.TChargentOperations.ChargeOpportunity_Click(Order.Id);
            }
            catch(Exception ex)
            {
                ApexPages.addMessages(ex);
                errorMessage = ex.getMessage();
                return Page.OrderCreated;
            }

 

I invoked the Chargent package to do some payment operations here. That's fine. But if any exceptions occured, it was caught by the catch block. But there will be an error messages says: Authorization Required. Seems my exception was not caught. Actually, I checked the debug log, the exception was caught properly.

 

Anybody has seen the same errors? If an exception occured, no matter it was caught or not, it will be redirected to the "Authorization Required" page. Why?

Help!

  • November 18, 2009
  • Like
  • 0

I'm trying to use sites to post a web-to-lead form for tradeshows.  I'm using the HTML generated by Salesforce, with some additional coding to make it look nice.  I tried posting on Sites, but the editor keeps giving me error messages.  I corrected most of them, but the editor does not like my <input> html tags. 

 

Is there no way to use html web coding in Sites?  I have not worked at all with Apex/Visualforce.

 

Thanks!

Hello all:

 

I have a site, and I have it mapped to the path /SS/. In other words, in my sandbox, the URLs all begin with http://mydomain.dev.cs0.force.com/SS/. This comes about because I filled in a suffix for the "default" web address when setting up the site.

 

In production, I have a custom domain set up. So the site is intended to appear at www.mydomain.com. The user can log in fine, but when they try to navigate the site, the internal links are pointing to www.mydomain.com/SS/somepage. These pages aren't getting found.

 

I wonder if the problem is because I am using the /SS/ prefix in my internal links, and when constructing PageReference objects. Should I not be doing that? Should I be doing something like PageReference.Somepage instead?

 

I guess the other thing I find puzzling is that it would appear that if you use a custom domain the suffix you specified isn't preserved -- is that the case?

 

Anyway, my bigger concern is how to construct the internal links so the site is portable.

  • November 14, 2009
  • Like
  • 0

Hello all:

 

So here' s my situation. I have a custom site, with custom look and feel. It's fully authenticated, such that a user must log in in order to see any pages, as described here:

 

http://community.salesforce.com/sforce/board/message?board.id=sites&message.id=1463&query.id=176741#M1463

 

Ideally, if a user tries to access a restricted page when not logged in, they'll be redirected to my customized login page. But that's not what happens. They are instead sent to the Unauthorized page, which has standard Force.com Sites look and feel.

 

So, first I tried to reset what the site's "unauthorized" page is. But unlike the site template, active home page or inactive home page, there seems to be no way to reset what the "unauthorized" page is.

 

So instead I tried to make the Unauthorized page automatically redirect to my login page -- I created a custom controller, added it to the Unauthorized page, and set an action attribute on the page to call a controller method that would cause a redirect, by returning a PageReference to my custom login page. No dice: instead, I mysteriously get the "Under Construction" page when I do this. When I look at the HTTP traffic I don't see any redirect, all I see is a 503 Service Unavailable.

 

I suppose I could restyle the Unauthorized page to look like my custom login page. But why should I have to?

 

I'm really not sure where to start. Questions:

 

  1. What governs which page counts as the "unauthorized" page for a site? Is the page Id? The page name?
  2. How do I force the Unauthorized page to simply and always redirect to my login page?
  • November 11, 2009
  • Like
  • 0

I have 2 custom objects --- Class (parent) and Participants (join object between Contact and Class).  The class object contains fields ClassName and ClassDate.  I would like to allow the user to select a class name and/or enter a class date via input boxes at the top of the form, which will then display a (filtered) list of participants below. The user can then update any of the Participated checkboxes of all individuals who participated in the selected class (or classes, if only an input date was entered).

 

This is my first VF page.... can anyone offer any suggestions or point me to an easy-to-understand example?

 

Thanks!

  • October 27, 2009
  • Like
  • 0

Hello all:

 

I'm struggling to define some basic HTML elements in my VF pages. Note that all my pages are showHeader=false.

 

The first of these is "title". Though I have added a "title" attribute to my apex:page element, no <title> tags appear in the page when I view it in a browser, and the displayed page title is just the URL.

 

Secondly, <body>. VF doesn't seem to be emitting <body> tags. Is that my responsibility? I can include them in my site template, just wondered if this is a known issue. Wondering whose job this is, in effect.

 

Similar issue for <head> tags. Here VF DOES emit these. This perpetuates my confusion about who's on the hook for outputting these basic elements, me or VF. If VF will construct the <head> that's great, but then my question is, how do I insert my own elements in the <head>?

 

No doubt this is straightforward, but I haven't spotted the answer yet. 

  • October 27, 2009
  • Like
  • 0

Hi all, any help on this would be appreciated. I have a client who wants me to build them a salesforce Site to allow them to let their Contacts login and update newsletter preferences. In order to do this, I've worked out i need to do the following:

 

 - Setup the Customer Portal to allow users to login

 - Add necessary fields to Contact object

 - Build sites pages to allow users to edit Contact data

 

However, I'm getting very confused about what is and isn't possible. This page tells me that I can setup teh Customer Portal and allow the default Customer Portal Manager role to read, create and edit contact objects. However, following the instructions exactly (including setting up a new Dev Edition account), when I go to edit the Customer Portal Manager permissions, I'm unable to change the Standard Object Permissions - they're just shown as read only, not as checkboxes as per the wiki page.

 

Then again, this page tells me that Site licences do not allow edit / delete on standard objects.

 

So, which is it? 

 

Finally, what licence will my client need to enable all this? I think it's Enterprise, which gives them Sites and the Customer Portal.  But will this give them Edit permissions for Portal users on Standard Objects? If not what will they need? And, given that they're not sure which licence they have, where can I find out in the Admin, or do they need to contact Customer Services?

 

AHA, Ben

Is it prudent to create an object in Salesforce the same way you would create a table for a relational database. See example below. The reason for doing this is so these tables can be controlled by Salesforce users rather than in an inaccessable SQL table, but once the table is setup, no users will have to modify them.

 

 

Grade (table/object) 
GradeIDGradeDesc 
AGreat 
BGood 
CFair 
DBelow Average
EPoor 
   
   
   
ContestGrade (table/object) 
ContestIDGradeIDPointValue
C101A20
C101B10
C101C5
C101D3
C101E0
C102A100
C102B80
C102C50
C102D20
C102E10
C103A5
C103B4
C103C3
C103D2
C103E1

 

 

 

 

 

 


Has anyone else noticed that line number scrolling broken in Eclipse 3.4 on Mac OS? I did read one blog post that identifies the issue. This makes it EXTREMLY hard to track down errors by line number. Eclipse 3.5 is rumored to work fine.

 

Can anyone comment on when the Force.com IDE might work with Eclipse 3.5?

  • October 11, 2009
  • Like
  • 0

Hi all:

 

I'm having a problem seeing errors that are arising in my VF pages.

 

I am using templating, so I have a template, an apex:composition tag, and an apex:define. In my particular case, the header areas of my template come out fine, but one particular apex:define worth of content is never rendered.

 

I'm sure I know why. Some of the code executed to generate that content is throwing exceptions. In fact I know just what the error is -- some of the getters in the VF code are accessing properties that were never queried for in SOQL -- so I might have {Loan__c.Address} in my VF, but until I add that to my query, the page content just disappears, presumably due to this error.

 

My problem is, I figured this out by trial and error. I don't know how to see the exception. What I don't understand is why it doesn't appear in the debug log. But in the debug log, execution appears to silently stop when the offending code is hit.

 

I know how, in a controller, to catch an exception and display it in the page. But this error is happening on a "hard-wired" code path -- I wouldn't even know where to put a try/catch. What I want is for the VF page to show me the error, the way it does in a VF page that I access via a Salesforce URL, that uses a regular SFDC look and feel.

 

The latter may provide clues -- I am using an entirely custom look, with no pageBlock-style components, and I am accessing the page via Force.com Sites. But even when I access it as /apex/<pageName>, I get the same thing -- blank content area with no clue as to error.

 

I'm sure I'm missing something very simple. Any ideas?

  • October 10, 2009
  • Like
  • 0

Hi all:

 

I am building a completely customized, authentication-only site. After some work, I've managed to set it up so that users must authenticate, and when they do they're taken to the site's landing page, a custom VF page.

 

The problem is, I still have what I'll call the "customer portal wrapper" around the page -- it has the customer portal CSS, and the tabs for Home, Case, Solutions, Reports, Documents, as well as the sidebar.

 

I want all that to disappear. Basically I want the page to appear exactly as it does when I access it directly in my org.

 

What do I need to turn on or off to accomplish this?

 

Thanks.

  • October 07, 2009
  • Like
  • 0