• mr.sollis
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 8
    Replies

Hey all,

 

I had this working, made a few changes, and can not for the life of me find now why it will not work.  I am creating a VF page that will rend on the lead layout.  Simple Page that will show all lead records that have the same email address on the page layout and a few fields from the lead.

 

At one point this all worked, and I've buggered something up.  Thanks for the help!

 

Error I'm getting "Content cannot be displayed: SObject row was retrieved via SOQL without querying the requested field: Lead.Email"

 

Here is the controller:

 

public class LeadLookupCon {
    
    public Lead lookupLead;
    
    List<Lead> leads;
    public String sortField {get; set;}
    public String previousSortField {get; set;}   
    
    public LeadLookupCon(ApexPages.StandardController controller) {
        this.lookupLead = (Lead)controller.getRecord();
    }

    public List<Lead> getLeads() {
        if(leads == null) leads = [select id,createddate,name,company, email,LeadSource, Event_Name__c,productinterest__c,inquiry_stage__c from lead where email=:lookupLead.email ORDER BY createddate desc];
        return leads;
    }
    
    public void doSort(){
        String order = 'asc';
        /*This checks to see if the same header was click two times in a row, if so it switches the order.*/
        if(previousSortField == sortField){
            order = 'desc';
            previousSortField = null;
        }else{
            previousSortField = sortField;
        }
        adbeSort.sortList(leads,sortField,order);

    }
}

 

 

Here is the VF Page:

<apex:page standardController="Lead" extensions="LeadLookupCon" standardStylesheets="true" showHeader="false" sidebar="false" tabStyle="Lead">
    <style>
        .even { background: #fff;}
    </style>
    <apex:form >
    <apex:pageBlock title="Previous Engagement History" tabStyle="Lead" >
        <apex:pageBlockTable value="{!leads}" var="lead" id="theTable" rowClasses="odd,even" styleClass="tableClass" cellpadding="5" width="100%">
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.Company.Label}" action="{!doSort}" rerender="theTable">
                            <apex:param name="sortField" value="Company" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.company}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.Name.Label}" action="{!doSort}" rerender="theTable">
                            <apex:param name="sortField" value="Name" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputLink value="/{!lead.id}">{!lead.name}</apex:outputLink>
            </apex:column>
            <apex:column >
                <apex:facet name="header">{!$ObjectType.Lead.Fields.Email.Label}</apex:facet>
                <apex:outputLink value="/{!lead.id}">{!lead.Email}</apex:outputLink>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.ProductInterest__c.Label}" action="{!doSort}" rerender="theTable">
                        <apex:param name="sortField" value="ProductInterest__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.ProductInterest__c}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.LeadSource.Label}" action="{!doSort}" rerender="theTable">
                        <apex:param name="sortField" value="LeadSource" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.leadsource}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.Event_Name__c.Label}" action="{!doSort}" rerender="theTable">
                        <apex:param name="sortField" value="Event_Name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.Event_Name__c}"/>
            </apex:column>
            <apex:column width="75px" >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.Inquiry_Stage__c.Label}" action="{!doSort}" rerender="theTable">
                        <apex:param name="sortField" value="Inquiry_Stage__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.Inquiry_Stage__c}"/>
            </apex:column>
            <apex:column width="100px" >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.createddate.Label}" action="{!doSort}" rerender="theTable">
                        <apex:param name="sortField" value="createddate" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.createddate}"/>
            </apex:column>
        </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:form>
</apex:page>

 

:

 

 

 

Hello All,  

 

I've been trying to get this information from some internal contacts at salesforce with not much success, hoping the community can help or at least share your experience with me if it is related.

 

We are in the process of scoping a project to consolidate and centralize our large customer/prospect database to one location.  My preference is to do this in SFDC because of the ease of access to the data and governance surrounding the data (among other reasons)... although i'm not sure it will be prudent from a cost and scale prospective.

 

Now I assume that because SFDC is founded on oracle, that scale will likely not be an issue (please correct me if I am wrong), however, there may be performance implications both with the UI and API without proper indexing and maintenance.

 

The scale I am looking to support now and in the future will be 150mm records across leads / contacts and 500k-1mm accounts, logging campaign history and activity for all of those records.

 

Assuming we are on unlimited edition, what implications should we consider?

thanks for your time in advance, I have two seemingly easy questions that have me stumped.

 

1) When are Formula fields (specifically with a lookup field to another object) updated?  instantly? when they are viewed in the UI?

  • I ask because I have a custom field on the contact, a formula field, that simple brings down the textual information from the user object, connected to the account.  So it looks like this: Contact -> Account (custom related list field) -> User -> Name
  • I am finding (I think) that the forumula field on the contact does not always match the user on the account it is pulling from


2)To validate this concern directly from the API I am trying to run this query:

 

  • select
        account.account_adm_owner__r.name,
        adm_owner_from_account__c
    from
        contact
    WHERE
        account.account_adm_owner__r.name!=adm_owner_from_account__c
  • I get an "invalid token" error on "!=adm_owner_from_account__c"
 
Thank you again for any guidance you can provide.

Greetings,

 

I have used a php client object to connect to salesforce for almost 3 years.  During that time, I have had to make minor updates to use the new features of the API as they have been release.  I currently have the development working for version 11.0 of the api and this custom php client which uses PEAR SOAP.

 

I can not quite figure out the exact reason for the descreptency.  On a separate server using PHP SOAP I tried the query below with the PHP toolkit provided  by salesforce (which by default also uses version 11.0 of the api.   The old client, using PEAR SOAP, does not error, but only returns 5 records.  The toolkit, using PHPSOAP, also does not error, but returns 83 rows.

 

What element of the old client could potentially limit the result set?  I can pull less complex queries down 2000 at a time.

 

Thoughts?

 

Here is the query:

 

 

SELECT
id, billingstate,billingcountry,industry,
account_adm_owner__r.userrole.name,
account_adm_owner__r.isactive

from account

WHERE
(
account_adm_owner__c=null OR account_adm_owner__c=''
OR account_adm_owner__r.isactive=false
OR account_adm_owner__r.name = 'Name 1'
OR account_adm_owner__r.name = 'Name 2'
OR (not account_adm_owner__r.userrole.name like '%ADM%')
)

 

 

 

I have a workflow on the task object that triggers when a task status is completed, and a few other requirements.  this workflow sends an outbound message to a script used to process the information. 

 

I enabled a second workflow, that also triggers on task status of completed, but no other requirements, this workflow sends an outbound message to a different script to process differently.

 

Enabling both work flows does not error, however, it does not send either outbound message now.  

 

Is this not possible?

I would like to build a view of contacts based on values found on the contacts account.  Is this possible?  I haven't been able to locate how to do this?  I can do it with the API, but not within the interface as a view.

Thanks in advance.

~Chad
For piece of mind, can one or any of you confirm that when I use the API to convert a lead into an account/contact, that the campaign history (campaignmember) will now be included on that contact?

I am 99% sure this is the case, but wanted to confirm.
Just for piece of mind, can one or any of you confirm that when I use the API to convert a lead into an account/contact, that the campaign history (campaignmember) will now be included on that contact?

I am 99% sure this is the case, but wanted to confirm.


Message Edited by mr.sollis on 05-08-2008 07:32 AM

Message Edited by mr.sollis on 05-08-2008 07:35 AM
my question is two fold:

1) Can I excecute an s-control on the create/edit page layout OR on save/edit
2) what is wrong with the code below for an js s-control, is there an easier way to accomplish this:

<script src="/soap/ajax/9.0/connection.js" type="text/javascript"></script>
<script language='text/javascript'>
try {
    var qr = executeQuery("SELECT Auto_Tracking_Code__c FROM Campaign ORDER BY Auto_Tracking_Code__c DESC");
    if(qr != null) {
        var campNext = parseInt(qr.records[0].get("Auto_Tracking_Code__c"))+1;
    } else {
        var campNext = 4000;
    }
} catch(error) {
    campNext = "Unknown";
}
document.write(campNext);
</script>
Through the webservice, I can reference account fields like "Account.Custom_Field__c"  I need to create a View in SFDC of contacts based on account field values. 

I haven't been able to create a custom contact formula field that pulls in the contacts account value for a specific field.  Is there a way to do this?  Is there an easier way to mange this?

Thank you.
Hello,

Does anyone know why a Workflow I created to trigger an outbound message on any create/edit would not send the outbound message when doing a mass / multiple record update.

It works perfectly on single edits, does not work at all on mass updates.

Thank you in adavance for your help  

Hello,

I am getting an error with my outbound message sent from a workflow on the lead.

The outbound message sends the lead(s) to my script which will apply some processing if the lead meets the right criteria.

I then return this, where Ack is true or false:

Code:
<—xml encoding="UTF-8" version="1.0">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
 <notifications xmlns="http://soap.sforce.com/2005/09/outbound">
  <Ack>false</Ack>
  </notifications>
 </soapenv:Body>
</soapenv:Envelope>

The error I am getting is SOAP Repsonse was a NACK. Any ideas here? My application does not load up the wsdl, it simply parses what is sent. Many thanks.



Message Edited by mr.sollis on 02-01-2008 01:31 PM

Hey all,

 

I had this working, made a few changes, and can not for the life of me find now why it will not work.  I am creating a VF page that will rend on the lead layout.  Simple Page that will show all lead records that have the same email address on the page layout and a few fields from the lead.

 

At one point this all worked, and I've buggered something up.  Thanks for the help!

 

Error I'm getting "Content cannot be displayed: SObject row was retrieved via SOQL without querying the requested field: Lead.Email"

 

Here is the controller:

 

public class LeadLookupCon {
    
    public Lead lookupLead;
    
    List<Lead> leads;
    public String sortField {get; set;}
    public String previousSortField {get; set;}   
    
    public LeadLookupCon(ApexPages.StandardController controller) {
        this.lookupLead = (Lead)controller.getRecord();
    }

    public List<Lead> getLeads() {
        if(leads == null) leads = [select id,createddate,name,company, email,LeadSource, Event_Name__c,productinterest__c,inquiry_stage__c from lead where email=:lookupLead.email ORDER BY createddate desc];
        return leads;
    }
    
    public void doSort(){
        String order = 'asc';
        /*This checks to see if the same header was click two times in a row, if so it switches the order.*/
        if(previousSortField == sortField){
            order = 'desc';
            previousSortField = null;
        }else{
            previousSortField = sortField;
        }
        adbeSort.sortList(leads,sortField,order);

    }
}

 

 

Here is the VF Page:

<apex:page standardController="Lead" extensions="LeadLookupCon" standardStylesheets="true" showHeader="false" sidebar="false" tabStyle="Lead">
    <style>
        .even { background: #fff;}
    </style>
    <apex:form >
    <apex:pageBlock title="Previous Engagement History" tabStyle="Lead" >
        <apex:pageBlockTable value="{!leads}" var="lead" id="theTable" rowClasses="odd,even" styleClass="tableClass" cellpadding="5" width="100%">
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.Company.Label}" action="{!doSort}" rerender="theTable">
                            <apex:param name="sortField" value="Company" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.company}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.Name.Label}" action="{!doSort}" rerender="theTable">
                            <apex:param name="sortField" value="Name" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputLink value="/{!lead.id}">{!lead.name}</apex:outputLink>
            </apex:column>
            <apex:column >
                <apex:facet name="header">{!$ObjectType.Lead.Fields.Email.Label}</apex:facet>
                <apex:outputLink value="/{!lead.id}">{!lead.Email}</apex:outputLink>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.ProductInterest__c.Label}" action="{!doSort}" rerender="theTable">
                        <apex:param name="sortField" value="ProductInterest__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.ProductInterest__c}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.LeadSource.Label}" action="{!doSort}" rerender="theTable">
                        <apex:param name="sortField" value="LeadSource" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.leadsource}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.Event_Name__c.Label}" action="{!doSort}" rerender="theTable">
                        <apex:param name="sortField" value="Event_Name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.Event_Name__c}"/>
            </apex:column>
            <apex:column width="75px" >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.Inquiry_Stage__c.Label}" action="{!doSort}" rerender="theTable">
                        <apex:param name="sortField" value="Inquiry_Stage__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.Inquiry_Stage__c}"/>
            </apex:column>
            <apex:column width="100px" >
                <apex:facet name="header">
                    <apex:commandLink value="{!$ObjectType.Lead.Fields.createddate.Label}" action="{!doSort}" rerender="theTable">
                        <apex:param name="sortField" value="createddate" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputText value="{!lead.createddate}"/>
            </apex:column>
        </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:form>
</apex:page>

 

:

 

 

 

thanks for your time in advance, I have two seemingly easy questions that have me stumped.

 

1) When are Formula fields (specifically with a lookup field to another object) updated?  instantly? when they are viewed in the UI?

  • I ask because I have a custom field on the contact, a formula field, that simple brings down the textual information from the user object, connected to the account.  So it looks like this: Contact -> Account (custom related list field) -> User -> Name
  • I am finding (I think) that the forumula field on the contact does not always match the user on the account it is pulling from


2)To validate this concern directly from the API I am trying to run this query:

 

  • select
        account.account_adm_owner__r.name,
        adm_owner_from_account__c
    from
        contact
    WHERE
        account.account_adm_owner__r.name!=adm_owner_from_account__c
  • I get an "invalid token" error on "!=adm_owner_from_account__c"
 
Thank you again for any guidance you can provide.
I would like to build a view of contacts based on values found on the contacts account.  Is this possible?  I haven't been able to locate how to do this?  I can do it with the API, but not within the interface as a view.

Thanks in advance.

~Chad
my question is two fold:

1) Can I excecute an s-control on the create/edit page layout OR on save/edit
2) what is wrong with the code below for an js s-control, is there an easier way to accomplish this:

<script src="/soap/ajax/9.0/connection.js" type="text/javascript"></script>
<script language='text/javascript'>
try {
    var qr = executeQuery("SELECT Auto_Tracking_Code__c FROM Campaign ORDER BY Auto_Tracking_Code__c DESC");
    if(qr != null) {
        var campNext = parseInt(qr.records[0].get("Auto_Tracking_Code__c"))+1;
    } else {
        var campNext = 4000;
    }
} catch(error) {
    campNext = "Unknown";
}
document.write(campNext);
</script>
Hello,

Does anyone know why a Workflow I created to trigger an outbound message on any create/edit would not send the outbound message when doing a mass / multiple record update.

It works perfectly on single edits, does not work at all on mass updates.

Thank you in adavance for your help  

Hello,

I am getting an error with my outbound message sent from a workflow on the lead.

The outbound message sends the lead(s) to my script which will apply some processing if the lead meets the right criteria.

I then return this, where Ack is true or false:

Code:
<—xml encoding="UTF-8" version="1.0">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
 <notifications xmlns="http://soap.sforce.com/2005/09/outbound">
  <Ack>false</Ack>
  </notifications>
 </soapenv:Body>
</soapenv:Envelope>

The error I am getting is SOAP Repsonse was a NACK. Any ideas here? My application does not load up the wsdl, it simply parses what is sent. Many thanks.



Message Edited by mr.sollis on 02-01-2008 01:31 PM