• Dovid B
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 11
    Replies

I have a contact form written in VF using Sites. However it seems when the lead is inserted, the owner assignment rules are not firing and the owner just remains the website.

 

I have a number of rules set up in Lead Assignment Rules and would like to use them. Is there something I am missing?

 

Here's the controller code:

global with sharing class ContactFormController {

    Lead lead;
    CampaignMember cmember;
    String submittedPageURL = 'http://asc-net.force.com/cms__Main?name=contact_confirm';
    
    global Lead getLead() {
        if(lead == null)
            lead = new Lead(firstname='First Name...',lastname='Last Name...');
        return lead;
    }
    
    global CampaignMember getCmember() {
        if(cmember == null)
            cmember = new CampaignMember(status='Responded');
        return cmember;     
    }

    global PageReference save() {
        //System.debug('Made it to save!');
        insert lead;
        //System.debug('Inserted Lead');
        
        if(cmember.CampaignId != null) {
            cmember.LeadId = lead.id;
            insert cmember; 
            //System.debug('Inserted Campaign Member');
        }
            
        PageReference submittedPage = new PageReference(submittedPageURL);
        submittedPage.setRedirect(true);
        //System.debug('Redirecting and we are outta here!');
        return submittedPage; 
        
    }
    
}

 

Is there any mechanism to test a formula? Kind of like the run anonymous apex functionality?

 

I created a formula to do lead assignment based on area code but it doesn't seem to be reassigning.

 

****Update

 

Actually it seems like the assignment code isn't running at all. I am using a VF on Sites with a custom controller to insert the lead. Will that bypass the assignment rules or still kick them off? If it does bypass them, how can I get them to trigger? (Preferably without a trigger)

Since when using apex:inputfield, inputtext, inputhidden, etc. the value attribute is bound to the apex or sobject property, is there any way to specify default values in the form, like a checked checkbox or a default string in the text box, etc?

Normally speaking in order to do a 301 redirect from a URL with parameters, you need to modify .htaccess with a rewriteCond as seen here for example.

 

Since, as far as I have seen, we don't have access to .htaccess in Sites. Anybody come up with a good way to redirect a URL with parameters? Preferably a way to transfer those parameters to the new URL.

 

Thanks.

We are using OrchestraCMS for our website CMS tool on Sites. However we need to add a custom component with its own custom controller to the page template. The problem is when I try to use it in Orchestra I get the following error:

 

Custom Controller cms.mycustomcontroller does not exist.

 

This makes perfect sense as mycustomcontroller is not in the cms namespace. That's OrchestraCMS's namespace. I am not using any name space. But it seems to insist that all controllers on the page are in the cms namespace. OrchestraCMS says this is outside what they will support.

 

So any ideas on how to have a custom component controller with a different namespace (or no namespace) on a page with a namespaced custom controller?

 

Thanks,

Dovid

We wanted to launch our new site today and were able to CNAME www.asc-net.com to asc-net.force.com and set www.asc-net.com in the Sites Details custom web address and all works fine.

 

The problem is we also need asc-net.com (without the www) to point to the homepage (as of now it points nowhere) and also asci.asc-net.com and *.asc-net.com

 

Iniitially we CNAMEs pointing all of them to asc-net.force.com but only the www version worked since that is what is in the custom web address field. The others sent to the SFDC login page. So then we tried change the CNAME so asci.asc-net.com and asc-net.com would point to www.asc-net.com but that also didn't work. We also tried CNAME forwarding and that did not work.

 

We had to roll back to the old site until this is resolved. But in the meantime we have set up sf1.asc-net.com which points to asc-net.force.com (and works) and sf2.asc-net.com which points to sf1.asc-net.com (which takes you to the login page) to use for troubleshooting this issue.

 

Anyone know how to fix this?

 

A big thanks in advance.

 

Dovid

What I want to do is fairly simple. I just want to send a user who has signed up for one of our fee-based webinars to authorize.net to handle the payment processing and then come back to our site and dump the registration info and payment confirmation into sfdc.

 

Now, on a non-Sites website I could do this fairly easily in php, java, or any of the other apis authorize.net provides. I would just have a form to collect the basic registration information, send that to authorize.net, get the confirmation back and drop the info into a db.

 

However since Sites is not using (not that I can access) php, java, etc. and they don't have an apex or a javascript api as far as I know, anybody have any suggestions how to interface to authorize.net? 

 

Please do not offer appExchange solutions as they are not in our budget right now. 

 

Thanks.

I have a contact form written in VF using Sites. However it seems when the lead is inserted, the owner assignment rules are not firing and the owner just remains the website.

 

I have a number of rules set up in Lead Assignment Rules and would like to use them. Is there something I am missing?

 

Here's the controller code:

global with sharing class ContactFormController {

    Lead lead;
    CampaignMember cmember;
    String submittedPageURL = 'http://asc-net.force.com/cms__Main?name=contact_confirm';
    
    global Lead getLead() {
        if(lead == null)
            lead = new Lead(firstname='First Name...',lastname='Last Name...');
        return lead;
    }
    
    global CampaignMember getCmember() {
        if(cmember == null)
            cmember = new CampaignMember(status='Responded');
        return cmember;     
    }

    global PageReference save() {
        //System.debug('Made it to save!');
        insert lead;
        //System.debug('Inserted Lead');
        
        if(cmember.CampaignId != null) {
            cmember.LeadId = lead.id;
            insert cmember; 
            //System.debug('Inserted Campaign Member');
        }
            
        PageReference submittedPage = new PageReference(submittedPageURL);
        submittedPage.setRedirect(true);
        //System.debug('Redirecting and we are outta here!');
        return submittedPage; 
        
    }
    
}

 

Is there any mechanism to test a formula? Kind of like the run anonymous apex functionality?

 

I created a formula to do lead assignment based on area code but it doesn't seem to be reassigning.

 

****Update

 

Actually it seems like the assignment code isn't running at all. I am using a VF on Sites with a custom controller to insert the lead. Will that bypass the assignment rules or still kick them off? If it does bypass them, how can I get them to trigger? (Preferably without a trigger)

Since when using apex:inputfield, inputtext, inputhidden, etc. the value attribute is bound to the apex or sobject property, is there any way to specify default values in the form, like a checked checkbox or a default string in the text box, etc?

I would like to indent some fields over but everytime I try they end up in the middle of the screen. Is there a command that can indent the apex:inputfield and apex:inputsecret field over. Here is what I have so far.

 

 

<apex:pageBlockSection title="User Information">
                <apex:outputLabel value="UserName" for="Username">
                    <br/>
                    <apex:inputField id="Username" value="{!referee.UserName__c}"/>
                Should be in the form of an email adress
                </apex:outputLabel>
                <br/>
                <apex:outputLabel value="Password" for="Password">
                    <br/>
                    <apex:inputSecret id="Password" value="{!referee.Password__c}"/>
                    Should be at the most 8 characters long
                </apex:outputLabel>
            </apex:pageBlockSection>

 

 

We are using OrchestraCMS for our website CMS tool on Sites. However we need to add a custom component with its own custom controller to the page template. The problem is when I try to use it in Orchestra I get the following error:

 

Custom Controller cms.mycustomcontroller does not exist.

 

This makes perfect sense as mycustomcontroller is not in the cms namespace. That's OrchestraCMS's namespace. I am not using any name space. But it seems to insist that all controllers on the page are in the cms namespace. OrchestraCMS says this is outside what they will support.

 

So any ideas on how to have a custom component controller with a different namespace (or no namespace) on a page with a namespaced custom controller?

 

Thanks,

Dovid

We allow customers to self-register for classes.  A registration requires collecting about 50 data points, which map to Account, Contact and Opportunity objects. Often we already have a Lead or Account instance created for the individual submitting the application, but sometimes we don't.

 

My question:  What's the best way to handle the capture of application web form data in SFDC?  One obvious way is to use the built-in Web to Lead capability.  But since we already have an Account with an email address, so conceptually a second approach could be to simply find the associated Account instance and update Account Contact fields, and create a new related Opportunity instance.  But is this approach a) reasonably doable in Apex and b) any better than creating a new new and then "converting" it?

 

Any other approaches / best practices we could consider for scenarios like this?

 

  • March 02, 2011
  • Like
  • 0

What I want to do is fairly simple. I just want to send a user who has signed up for one of our fee-based webinars to authorize.net to handle the payment processing and then come back to our site and dump the registration info and payment confirmation into sfdc.

 

Now, on a non-Sites website I could do this fairly easily in php, java, or any of the other apis authorize.net provides. I would just have a form to collect the basic registration information, send that to authorize.net, get the confirmation back and drop the info into a db.

 

However since Sites is not using (not that I can access) php, java, etc. and they don't have an apex or a javascript api as far as I know, anybody have any suggestions how to interface to authorize.net? 

 

Please do not offer appExchange solutions as they are not in our budget right now. 

 

Thanks.