• ManDarMan2
  • NEWBIE
  • 0 Points
  • Member since 2009

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

I'm getting a new error in Winter '10.

 

"Implementation restriction: expression binding is not
allowed in the SELECT list of a batch query"

 

I started getting this error when we moved to a Winter '10 sandbox. The SOQL in question looks something like this:

 

select r.id from referral__c r where...

 

Note the "r" alias for referral__c.

 

This query is used to instantiate a StandardSetController. Other queries (not associated with a StandardSetController) with the alias notation work fine.

 

Removing the alias solves the problem.

 

ManDarMan2

http://comitydesigns.com

 

 

 

I have a customer portal which is self-registration enabled. Self-registration happens through Sites. I have setup SiteLogin and SiteRegistration apex classes with some minor changes. The user (and contact) gets created, but the "new user" email is never sent out, even though I am setting the triggerUserEmail option. Here's the code snippet:

 

//Async method, using @future, to create the User record and associate it to the previously created Contact
//This uses @future because you can not have mixed DML operations for standard objects (Account, Contact) and Setup objects(User)
@future static void createUser(String contactId, String userName, String firstName, String lastName, String email, String phone, String zip, String age, String nickName, String profileId) {
       
        System.debug('nickname = ' + nickName + ' phone = ' + phone + ' zip = ' + zip + ' age = ' + age + ' contactid = ' + contactId + ' email = ' + email + ' firstName = ' + firstName + ' lastName = ' + lastName + ' userName = ' + userName + ' profileId = ' + profileId);
       
        Database.DMLOptions dmo = new Database.DMLOptions();
        dmo.EmailHeader.triggerUserEmail = true;
       
        User u1 = new User(contactId=contactId, username=userName, firstname=firstName,
            lastname=lastName, email=email, phone=phone, postalcode=zip, zip__c=zip, age_group__c=age,
            alias = nickName, profileid = profileId, emailencodingkey='UTF-8',
            languagelocalekey='en_US', localesidkey='en_US', timezonesidkey='America/Los_Angeles',
            isportalselfregistered=true
            );
     
        u1.setOptions(dmo);
        insert u1;
    }

 

Again, the user and contact get created just fine, but the email with password is never sent. (The "reset password" email does get sent.) The email template does not use any merge variables.

 

Is there some other setting that I am missing? Is this a Sites issue or a Customer Portal Issue?

 

I have login/authentication to Customer Portal setup through Sites. When I login through Sites, one of my customer portal pages which has an embedded visualforce page does not render the visualforce page, and instead shows the salesforce login screen in its place. The rest (non-Visualforce) part of the page shows up a-okay.

 

I have checked and rechecked all access and CRUD permissions for the visualforce page, the apex classes, the custom objects etc. I.e. everything is on the layout, it's accessible by the profile etc.

 

If I type in the URL of the visualforce page manually, it actually renders properly (even in the context of the login through Sites). It's only when it's embedded, that it doesn't show up.

 

Also, if I login directly to the customer protal (i.e. not through Sites) then the problem goes away - i.e. the embedded visualforce page dispalys correctly.

I have a customer portal which is self-registration enabled. Self-registration happens through Sites. I have setup SiteLogin and SiteRegistration apex classes with some minor changes. The user (and contact) gets created, but the "new user" email is never sent out, even though I am setting the triggerUserEmail option. Here's the code snippet:

 

//Async method, using @future, to create the User record and associate it to the previously created Contact
//This uses @future because you can not have mixed DML operations for standard objects (Account, Contact) and Setup objects(User)
@future static void createUser(String contactId, String userName, String firstName, String lastName, String email, String phone, String zip, String age, String nickName, String profileId) {
       
        System.debug('nickname = ' + nickName + ' phone = ' + phone + ' zip = ' + zip + ' age = ' + age + ' contactid = ' + contactId + ' email = ' + email + ' firstName = ' + firstName + ' lastName = ' + lastName + ' userName = ' + userName + ' profileId = ' + profileId);
       
        Database.DMLOptions dmo = new Database.DMLOptions();
        dmo.EmailHeader.triggerUserEmail = true;
       
        User u1 = new User(contactId=contactId, username=userName, firstname=firstName,
            lastname=lastName, email=email, phone=phone, postalcode=zip, zip__c=zip, age_group__c=age,
            alias = nickName, profileid = profileId, emailencodingkey='UTF-8',
            languagelocalekey='en_US', localesidkey='en_US', timezonesidkey='America/Los_Angeles',
            isportalselfregistered=true
            );
     
        u1.setOptions(dmo);
        insert u1;
    }

 

Again, the user and contact get created just fine, but the email with password is never sent. (The "reset password" email does get sent.) The email template does not use any merge variables.

 

Is there some other setting that I am missing? Is this a Sites issue or a Customer Portal Issue?

 

Hi all,

 

I'm new to Salesforce and am trying to work on a client site.  I'm getting the hang of working with pages and such and have the basic layout of the site on the client's Force.com site.  Now I'm getting into the nitty-gritty of things and keep hitting brick walls everywhere I turn.  I've tried searching, reading docs and this message board, but I can't seem to find what I'm looking for.  So in my last ditch effort, I'm hoping one of you gurus can point me in the right direction.

 

Here's the scenario....

 

I have a client e-commerce site, subscription based.  In order for the customer to access their account, they (obviously) need to login.  I have the login component working, but, after they login, I want the login form to switch to account related links (i.e. My Account).  I'm a PHP guy, and it would be relatively easy to set an "IF" conditional statement to display the login form or links based on if they are logged in, but it seems to be a bit more complicated in Salesforce.  Maybe (hopefiully) I'm looking too deep into this and it's a relatively simple process.

 

I don't want to take too much of anyone's time in this, nor am I looking for someone to outright code it for me.  I'm just looking for someone that can point me in the right direction as to how I can make this happen, whether it be through controllers, classes, or directly in the page itself.

 

Thanks in advance and hopefully in the near future, I can return the favor here when I get the hang of it.

Hi,

 

I have a Visualforce page embedded on the detail page of a custom object.

As an Administrator, when i try to login to a particular User's account and try to view the Detail page.

The detail page shows up with Visualforce page embedded in a section, but sometimes the embedded Visualforce page section shows up the login screen.

 

When i try to login as a User and try to view the same, it works perfectly. it never shows up the login screen.

 

Can anyone suggest why actually this is happening and what can be the solution?

 

Regards,

OnDem 

 

 

Message Edited by OnDem Dev on 07-28-2009 11:51 PM