• aeben
  • NEWBIE
  • 130 Points
  • Member since 2008

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

Hi Community,

 

I'm creating a visualforce page on opportunity object. My Stage values are dependent on Record type in Opportunity. I need to display the Stage picklist on this new visualforce page but it should contain only the valid picklist values for the particular record type of the Opportunity record. How can I achieve this?

         

       I found this article in which the author is making use of two new custom objects to store the dependency information but I don't want to use this since it is going to be very difficult to maintain it. Is there any workaround for this (using the Metadata API or something)?

  • April 22, 2009
  • Like
  • 0

Suppose I have a select list as shown in this visualforce code:

 

<apex:selectList id="type" size="1" value="{!type}" onchange="{!test}"> <apex:selectOption itemLabel="Type1" itemValue="Type1" /> <apex:selectOption itemLabel="Type2" itemValue="Type2" /> <apex:selectOption itemLabel="Type3" itemValue="Type3" /> </apex:selectList>

 

 and I want to alert the value of the selected selectOption from the selectList as shown in this apex code:

 

public string selectedType; public string getType() { return selectedType; } public void setType(string value) { selectedType = value; } public string getTest() { return 'alert("'+selectedType+'");'; }

 

 Now, I'm guessing the default getter and setter of the type value of the selectList does not work as I thought it would since this apex code simply alerts "null".

Does anyone know how to make this work or how to get the value of the selected selectOption within the selectList?

 

 

Hello Friends, I am stuck with an issue related with diplaying records in a hierarchy. I need to display the fetched records from the controller in a Tree Structure dynamically. The number of levels is not fixed here. Has anyone worked on a similiar requirement? Is there a way i can achieve this?? Please Guide!! Thanks, Cool_D

First, let me start by saying that I not using any managed packages in my code. 

 

Until very recently, when you execute code using Execute Anonymous or System Log, it used to show method entries, exits and when there is a exception, it used to tell you what the exception and the line number it happened.

 

I am trying to debug something using Execute Anonymous in eclipse, and I am seeing a lot of "ENTERING_MANAGED_PKG" lines and the log recahes it limit. I used to run this code the same way and see the whole log.

 

If I run the same code in SystemLog I see the enter log, but it doesn't help. Here is an example of what I see in System Log.

 

13:43:10.563 (9563923000)|VARIABLE_ASSIGNMENT|[261]|e|"common.apex.runtime.impl.ExecutionException: Attempt to de-reference a null object"|0x4dab7950

13:43:10.564 (9564116000)|VARIABLE_ASSIGNMENT|[-1]|value|"Attempt to de-refere (17 more) ..."
13:43:10.564 (9564131000)|VARIABLE_ASSIGNMENT|[11]|this.message|"Attempt to de-refere (17 more) ..."|0x41c0137b

 

Not sure how the hex decimal value is going to help me in debug. ;)

 

Someone else seeing the same behavior?

  • January 26, 2012
  • Like
  • 0

When JSON support was added in APEX, I was one of those guys who jumped up and down. Started using heavily for one of my integration project and everything was fine and dandy for couple week. Since yesterday, I have been noticing some weired behavior. The first time I noticed it, I thought it was one of those APEX issues I love to call "APEX weirdness" and hoped that it will fix itself (READ: getting fixed without us knowing). That hasn't happened. :(

 

Here is the issue. 

 

My JSON parsing code looks like this:

class SomeApexWrapper {

public static SomeApexWrapper getInstance(String jsonString)

JSONParser parser = JSON.createParser(jsonString);       

SomeApexWrapper w = (SomeApexWrapper) parser.readValueAs(SomeApexWrapper.class);

}

}

 

This code was working fine until two days ago. It stops working If I change any class that uses this class to parse json string. The error I get is "[Source: java.io.StringReader@21363a13; line: 1, column: 1] Don't know the type of the Apex object to deserialize"

 

Just saving the SomeApexWrapper  class again fixes the issue. 

 

Has anyone had/having this issue? Is there a permanent solution for this?

  • November 07, 2011
  • Like
  • 0

I am trying to bulk load EventAttendees. When I try to create them using the Webservice API client in Java, getting an error that says "Entity type cannot be inserted: Event Attendee". When I look at the webservice API documentation, it says that create call is supported on EventAttendee. Please advice.

 

Here is the response.

 

 

<?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
        <createResponse>
          <result>
            <errors>
              <message>entity type cannot be inserted: Event Attendee</message>
              <statusCode>CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY</statusCode>
          </errors>
            <id xsi:nil="true"/>
              <success>false</success>
          </result>
        </createResponse>
      </soapenv:Body>
    </soapenv:Envelope>

 

<?xml version="1.0" encoding="UTF-8"?>    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">      <soapenv:Body>        <createResponse>          <result>            <errors>              <message>entity type cannot be inserted: Event Attendee</message>              <statusCode>CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY</statusCode>          </errors>            <id xsi:nil="true"/>              <success>false</success>          </result>        </createResponse>      </soapenv:Body>    </soapenv:Envelope>

 

 

  • June 10, 2011
  • Like
  • 0

Is there a way to access public calendar and resources from APEX? 

 

Here is what I trying to do:

 

Given a event, I want to find the name of the public calendar and also find the name of the resource invited to the event. Event.OwnerId gives me the public calendar id. But, I not able to find the public calendar name. Likewise, I can query EventAttendee to find the AttendeeId, but I can't seem to find a way find to find the resource name.

 

Any thoughts / suggestions? Thanks a lot.

  • April 09, 2011
  • Like
  • 0

Followed the instructions here to build a modal dialog in my page. Its working as expected. Issue is, when I add a Date field to the dial dialog and place the cursor in the field, datepicker is positioned correctly. It does not appear right below the field. It appears at some random position. Anybody with the same issue?

  • June 10, 2010
  • Like
  • 0

Getting this error when changing I try to change the Name field from Text to AutoNumber.

 

Error: Cannot change Record Name type to autonumber; field update exists.

 

Any Ideas? Thanks in advance. 

  • February 24, 2010
  • Like
  • 0

I am trying to implement a one-way ssl for a service call from an ESB. There is no default trust store here.

 

Is there a certificate in Salesforce that needs to be added in the ESB?

 

Thanks in advance 

  • February 15, 2010
  • Like
  • 0
I am working on white listing salesforce ip ranges so that requests from SalesForce can get through our company firewall. Got the range for PROD. What is the range for Sandboxes? Can't seem to find it anywhere. Please help.
  • January 07, 2010
  • Like
  • 0

In Winter 10.

 

I have a batch apex that could potentially return at least  250000 records. 

 

Documentation says that batch jobs using a query locator can return 50 million records.

 

But, the batch job that I have does not work if the query returns even 20000 records.

 

Anyone with the same issue? 

  • October 01, 2009
  • Like
  • 0

In sandbox that got upgraded to winter 10.

 

I am trying to return a Database.QueryLocation from the start method.

 

The release notes and the documentation for winter 10 clearly says that I can return either iterable or QueryLocator. But, in my code if  I say something like 

 

global Database.QueryLocator start(Database.BatchableContext ctx)

{

return Database.getQueryLocator('Some query here'); 

 

It does not compile.

  

  • September 22, 2009
  • Like
  • 0

I have a button on a related list that executes some java script when its clicked. I would like to reference a Static Resource in the java script. Any inputs?

 

Thanks 

  • May 04, 2009
  • Like
  • 0

FYI Post.

 

I was trying to pass multiple parameters on a command link. I had 3 param tags nested inside an command link. 

 

Sometimes I was getting all three parameters and sometimes I was getting the first one alone. Puzzled. Went thru this discussion board. Couldn't find anything. After some digging, this is what I found.

 

The values that you try to pass as parameters should NOT have any comma(,) in it!!!!! If you have it, then it messes the parameters list. Even if you use assignTo, it will not work.

 

For example,

 

<apex:commandLink action="{!doSomething}">

<apex:param name="p1" value="{!account.Name}">

<apex:param name="p2" value="{!account.Region__c}"> 

</apex:commandLink> 

 

 As long as account name does not have a comma in it, you should be fine. If it does, then you will get the substring before the comma as p1 and p2 will be null. 

 

Sorry I don't have a solution yet. Thinking of stripping out the comma before It gets rendered in the VF page. 

 

I think the Best solution would be for salesforce to fix the translation logic for the param tag. 

  • April 06, 2009
  • Like
  • 0

I have added a custom button to a related list. And the button is pointing to a VF page with controller extension.

 

When the button is clicked i want to be able to find the records that has been selected from the related list.

 

I know you can't use GETRECORDIDS in VF pages. Is there a way to go about it?

 

Thanks 

  • March 11, 2009
  • Like
  • 0
Here is my requirment:
 
We want to add a button (something like a detail page link) in a Standard Page. One click of the button we want to execute something in java script.
 
Here is what I did:
 
Create a VF page with the button and the required java script. Added the VF page in the section (create a new section in the layout).
 
Functionality wise it is working the way we want it. But, I seem to have run into a cosmetic issue. The background color of the iframe where the vf page is loaded, is not consistent (it is actually white) with the standard color (grey).
 
Is there a way to fix it?
  • January 11, 2009
  • Like
  • 0
I am trying to develop a controller extension. How to find out what methods are there in the Standard Controller that I am trying to extend?
  • October 27, 2008
  • Like
  • 0
I have a custom button linking to a S-Control. After rewriting the S-Control to an VF page, I am trying to make the button point to the VF page. When I pick the Content Source as Visual Force Page, the Content drop-down just displays an empty list. It doesn't let me pick a VF page.
 
Any help would be appreciated.
  • October 22, 2008
  • Like
  • 0
My page looks like this
 

<apex:commandButton value="Search" rerender="noresults" status="searchStatus" action="{!query}"/>

<apex:outputPanel id="noresults">

<apex:actionStatus id="searchStatus">

<apex:facet name="start">

<apex:outputText >Working......</apex:outputText>

</apex:facet>

<apex:facet name="stop">

<apex:outputText rendered="{!showTable}">Found</apex:outputText>

<apex:outputText rendered="{!showNoRecFound}">No Records Found</apex:outputText>

</apex:facet>

</apex:actionStatus>

</apex:outputPanel>

getShowTable() and getShowNoRecFound() cannot return true at the same time. Even if getShowTable() returns true, the text "Found" does not get displayed. When getShowNoRecFound() returns true the corresponding text is getting displayed.

I tried moving one of the outputText to a different outputPanel. Then it works perfectly fine. But the status gets messed up!!

Am I missing something?

  • September 12, 2008
  • Like
  • 0
Visualforce newbie.
 
I wonder if it is possible to call a customer controller action from java script.
 
here is what i want to do:
 
I have a input field and a button. I have binded the button to an action from the controller. No issues there. I have added a onkeypress on the input field. So that when the enter key is pressed, I want to call the action method bound to the button.
 
Thanks in advance.
 
  • September 12, 2008
  • Like
  • 0
I am trying to create a keystore (to be used in my web service client). I downloaded the client certificate from sales force and tried to run the keytool application.

Command:

keytool -import -file sfdc-client.cert -keystore sfdcclient.keystore -storepass sfdcclient -alias sfdc

Got the error java.lang.Exception: Input not an X.509 certificate

BTW I am using 1.4.1_05. Thought it might be the jre version. I remember reading that early version of 1.4 had some issues. So Tried doing the same thing with 1.5. Still got the same error.

Please help.


  • April 25, 2008
  • Like
  • 0

I'm scratching my head on this one.  What I'm trying to is update previous opportunity names in sequece by the date they were created and the account they were created for.  The trigger I am writing will update a field on the opportunity called Daily_Tracking_Number__c, but only if there is a date in the SOF_Requested_Date field.  

 

The daily tracking number field is then incorporated into a workflow that will update the opportunity name with the daily tracking number on the end "[OppName - Date - Daily Tracking Number".

 

For example:

Client A had 5 Opportunities created within the date range of 5/01/2010 and 6/01/2010.  Once these are updated, I'm trying to have the Daily_Tracking_Number__c field update in sequence by the CreatedDate.  Below is a chart of what I'm trying to explain:

 

Client A:

Opportunity created on 5/1 - Daily_Tracking_Number will = 1

Opportunity created on 5/4 - Daily_Tracking_Number will = 2

Opportunity created on 5/10 (but there is no date in the SOF Releasted Date - Daily_Tracking_Number will = 0

Opportunity created on 5/12 - Daily_Tracking_Number will = 3

 

Below is the code I have so far, but it does not work properly.  I'm not getting any error messages, but it's not updating the daily tracking number field:

 

Any ideas would be greatly appreciated!

 

Trigger:

 

trigger ManageOpportunitiesBeforeUpdate on Opportunity (before update) {   
    
        if(Trigger.isUpdate && Trigger.isBefore){

        ManageOpportunitiesBeforeUpdate.beforeUpdate(Trigger.New); 
    }   
} //end trigger

 

 

 

 

 

Class referenced by the trigger:

 

public static void beforeUpdate(list<Opportunity> optys)
{
set<Id> accids = new set<id>();
set<Date> createdDates = new set<Date>();

for (Opportunity o : optys)
{
if (o.SOF_Requested_Date__c == null)
{
accids.add(o.AccountId);
createdDates.add(o.CreatedDate.date());
}
}

//this will include the opps we need to count
Id thisaccid;
Date thisdate;
list<Opportunity> allopps = [select Id, AccountId, CreatedDate
from Opportunity
where Id in :accids
and CreatedDate in :createdDates
order by AccountId, CreatedDate];
map<Id, Integer> oppid2seqnummap = new map<Id, Integer>();

//reset placeholders: last Account, last Date, current counter - JS alerted 11/17 to check the size of the list before getting the value
if(allopps.size()>0){
thisaccid = allopps[0].AccountId;
thisdate = allopps[0].CreatedDate.date();
}
Integer counter = 0;


//keep track of all sequence numbers
for (Opportunity o : allopps)
{

//same account as the last one?
if (thisaccid == o.AccountID)
{
//same date as the last one?
if (thisdate == o.CreatedDate.date())
{
counter++;
}
else //new date
{
counter = 1;
}
}
else //new account
{
counter = 1;
}

//store counter for this Opp
oppid2seqnummap.put(o.Id, counter);

//reset to compare to next Opp
thisdate = o.CreatedDate.date();
thisaccid = o.AccountId;
}

//now go back through passed Opp list
for (Opportunity o :optys)
{
Integer seqnum = oppid2seqnummap.get(o.Id);
//TODO: populate Name field or store seq num somewhere

o.Daily_Tracking_Number__c = seqnum;

 


}

} //end before update


} //end class


 

When JSON support was added in APEX, I was one of those guys who jumped up and down. Started using heavily for one of my integration project and everything was fine and dandy for couple week. Since yesterday, I have been noticing some weired behavior. The first time I noticed it, I thought it was one of those APEX issues I love to call "APEX weirdness" and hoped that it will fix itself (READ: getting fixed without us knowing). That hasn't happened. :(

 

Here is the issue. 

 

My JSON parsing code looks like this:

class SomeApexWrapper {

public static SomeApexWrapper getInstance(String jsonString)

JSONParser parser = JSON.createParser(jsonString);       

SomeApexWrapper w = (SomeApexWrapper) parser.readValueAs(SomeApexWrapper.class);

}

}

 

This code was working fine until two days ago. It stops working If I change any class that uses this class to parse json string. The error I get is "[Source: java.io.StringReader@21363a13; line: 1, column: 1] Don't know the type of the Apex object to deserialize"

 

Just saving the SomeApexWrapper  class again fixes the issue. 

 

Has anyone had/having this issue? Is there a permanent solution for this?

  • November 07, 2011
  • Like
  • 0

Hello, 

 

Here is the error I receive, 

Error: ContactController Compile Error: Illegal assignment from LIST<Contact> to LIST<Contact> at line 11 column 9

 

Below is the simplified version of my Apex class: 

 

public class ContactController {       

public void getContact() {       

List<Contact> d = [select id, name from Contact where id = :ApexPages.currentPage().getParameters().get('id')];           }      

}

 

I tried casting the query result to (List<Contact>), which gives me the following error:

Error: ContactController Compile Error: Incompatible types since an instance of LIST<Contact> is never an instance of LIST<Contact> at line 4 column 27

 

Thanks for the help! 

  • November 07, 2011
  • Like
  • 0

i was trying to add an error on event if meetings coincide and wanted to create an log object indicating that a conflict occured. I would appreciate if anyone knew if this were possible - that is, both rollback of the object on which the trigger is defined and some method of adding a separate object.

thank you.

Hello Everyone,

Below is requirement:

 

(1)First Obtain the RecordTypeId when saving or updating the Lead. 

  Select RecordTypeId from Lead where ID = :Id

 

(2)If RecordTypeId = 01260000000Q32MAAS

 Query = [Select Owner__c from Prospect_Assignment__c where Active__c = True  and Country__c INCLUDES (:ld.Country) and Prospect_Record_Type__c = 'MCI' and Postal_Code_Prefix__c INCLUDES (:ld.Postal_Code_Prefix__c) and State_Province__c INCLUDES(:ld.State) and  Stratus_Product__c =: ld.Stratus_Product_s__c and Prospect_Type__c =:ld.Prospect_Type__c];

 

(3)And then update the lead so the OwnerId =  Query.Owner__c

 

To satisfy the above requirement, I wrote a Trigger on Lead (Prospect).

trigger UpdateLeadOwner on Lead (before insert, before update) {
  
  
    System.debug('----------------------------Trigger');
    
    
    String lCountryStr = '';   
    
    String lPCPrefixStr = '';
    
    String lStateStr = '';

    Set<String> lStratusProductSet = new Set<String>();

    Set<String> lProspectTypeSet = new Set<String>();

    for(Lead ld: Trigger.new) {

        if(ld.Country != null && ld.Country != '') {
            
            System.debug('------------------------------ld.Country:'+ld.Country);

            lCountryStr += ld.Country;
        }
        
        if(ld.Postal_Code_Prefix__c != null && ld.Postal_Code_Prefix__c != '') {

            System.debug('------------------------------ld.Postal_Code_Prefix__c:'+ld.Postal_Code_Prefix__c);

            lPCPrefixStr += ld.Postal_Code_Prefix__c; //','+
        }

        if(ld.State != null && ld.State != '') {

            System.debug('----------------------------------ld.State:'+ld.State);

            lStateStr += ld.State;  //','+
        }

        if(ld.Stratus_Product_s__c != null && ld.Stratus_Product_s__c != '') {

            System.debug('---------------------------------ld.Stratus_Product_s__c:'+ld.Stratus_Product_s__c);

            lStratusProductSet.add(ld.Stratus_Product_s__c);
        }

        if(ld.Prospect_Type__c != null && ld.Prospect_Type__c != '') {

            System.debug('---------------------------------ld.Prospect_Type__c:'+ld.Prospect_Type__c);

            lProspectTypeSet.add(ld.Prospect_Type__c);
        }
    }

    System.debug('----------------------------------lCountryStr:'+lCountryStr);
    System.debug('----------------------------------lPCPrefixStr:'+lPCPrefixStr);
    System.debug('-----------------------------------lStateStr:'+lStateStr);
    System.debug('-----------------------------------lStratusProductSet:'+lStratusProductSet);
    System.debug('------------------------------------lProspectTypeSet:'+lProspectTypeSet);
    List<Prospect_Assignment__c> prosAssList =  [Select Owner__c, Country__c, Prospect_Record_Type__c, Postal_Code_Prefix__c, State_Province__c, Stratus_Product__c, Prospect_Type__c from            

Prospect_Assignment__c where Active__c = True and Country__c INCLUDES (:lCountryStr) and Prospect_Type__c IN:lProspectTypeSet and Stratus_Product__c IN: lStratusProductSet and            

Postal_Code_Prefix__c INCLUDES (:lPCPrefixStr) and Prospect_Record_Type__c = 'MCI'  and State_Province__c INCLUDES(:lStateStr)];   
    
     for(Lead ld:Trigger.new) {
        for(Prospect_Assignment__c prosAss:prosAssList) {

            if(ld.Country.contains(prosAss.Country__c)) {
                System.debug('----------------ld:'+ld);
                ld.OwnerId = prosAss.Owner__c;
                break;
            }

            if(ld.Postal_Code_Prefix__c.contains(prosAss.Postal_Code_Prefix__c)) {
                System.debug('----------------ld:'+ld);
                ld.OwnerId = prosAss.Owner__c;
                break;
            }

            if(ld.State.contains(prosAss.State_Province__c)) {
                System.debug('----------------ld:'+ld);
                ld.OwnerId = prosAss.Owner__c;
                break;
            }

            if(ld.Stratus_Product_s__c.contains(prosAss.Stratus_Product__c)) {
                System.debug('----------------ld:'+ld);
                ld.OwnerId = prosAss.Owner__c;
                break;
            }

            if(ld.Prospect_Type__c.contains(prosAss.Prospect_Type__c)) {
                System.debug('----------------ld:'+ld);
                ld.OwnerId = prosAss.Owner__c;
                break;
            }
        }
    }

Debug Log:

 

23.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO
09:48:48.290 (290354000)|EXECUTION_STARTED
09:48:48.290 (290386000)|CODE_UNIT_STARTED|[EXTERNAL]|TRIGGERS
09:48:48.290 (290406000)|CODE_UNIT_STARTED|[EXTERNAL]|01qP00000008f7J|UpdateLeadOwner on Lead trigger event BeforeUpdate for [00QP0000002dhMR]
09:48:48.291 (291257000)|SYSTEM_METHOD_ENTRY|[7]|System.debug(ANY)
09:48:48.291 (291308000)|USER_DEBUG|[7]|DEBUG|----------------------------Trigger
09:48:48.291 (291318000)|SYSTEM_METHOD_EXIT|[7]|System.debug(ANY)
09:48:48.291 (291786000)|SYSTEM_METHOD_ENTRY|[17]|LIST.iterator()
09:48:48.291 (291922000)|SYSTEM_METHOD_EXIT|[17]|LIST.iterator()
09:48:48.291 (291949000)|SYSTEM_METHOD_ENTRY|[17]|system.ListIterator.hasNext()
09:48:48.292 (292138000)|SYSTEM_METHOD_EXIT|[17]|system.ListIterator.hasNext()
09:48:48.292 (292166000)|SYSTEM_METHOD_ENTRY|[17]|system.ListIterator.next()
09:48:48.292 (292193000)|SYSTEM_METHOD_EXIT|[17]|system.ListIterator.next()
09:48:48.292 (292315000)|SYSTEM_METHOD_ENTRY|[20]|System.debug(ANY)
09:48:48.292 (292347000)|USER_DEBUG|[20]|DEBUG|------------------------------ld.Country:United States
09:48:48.292 (292354000)|SYSTEM_METHOD_EXIT|[20]|System.debug(ANY)
09:48:48.292 (292422000)|SYSTEM_METHOD_ENTRY|[24]|System.debug(ANY)
09:48:48.292 (292451000)|USER_DEBUG|[24]|DEBUG|------------------------------ld.Postal_Code_Prefix__c:901
09:48:48.292 (292459000)|SYSTEM_METHOD_EXIT|[24]|System.debug(ANY)
09:48:48.292 (292535000)|SYSTEM_METHOD_ENTRY|[28]|System.debug(ANY)
09:48:48.292 (292564000)|USER_DEBUG|[28]|DEBUG|----------------------------------ld.State:AR
09:48:48.292 (292571000)|SYSTEM_METHOD_EXIT|[28]|System.debug(ANY)
09:48:48.292 (292628000)|SYSTEM_METHOD_ENTRY|[32]|System.debug(ANY)
09:48:48.292 (292656000)|USER_DEBUG|[32]|DEBUG|---------------------------------ld.Stratus_Product_s__c:Avance
09:48:48.292 (292663000)|SYSTEM_METHOD_EXIT|[32]|System.debug(ANY)
09:48:48.292 (292692000)|SYSTEM_METHOD_ENTRY|[33]|SET.add(ANY)
09:48:48.292 (292733000)|SYSTEM_METHOD_EXIT|[33]|SET.add(ANY)
09:48:48.292 (292779000)|SYSTEM_METHOD_ENTRY|[36]|System.debug(ANY)
09:48:48.292 (292807000)|USER_DEBUG|[36]|DEBUG|---------------------------------ld.Prospect_Type__c:End User
09:48:48.292 (292814000)|SYSTEM_METHOD_EXIT|[36]|System.debug(ANY)
09:48:48.292 (292841000)|SYSTEM_METHOD_ENTRY|[37]|SET.add(ANY)
09:48:48.292 (292873000)|SYSTEM_METHOD_EXIT|[37]|SET.add(ANY)
09:48:48.292 (292881000)|SYSTEM_METHOD_ENTRY|[17]|system.ListIterator.hasNext()
09:48:48.292 (292891000)|SYSTEM_METHOD_EXIT|[17]|system.ListIterator.hasNext()
09:48:48.292 (292917000)|SYSTEM_METHOD_ENTRY|[40]|System.debug(ANY)
09:48:48.292 (292943000)|USER_DEBUG|[40]|DEBUG|----------------------------------lCountryStr:United States
09:48:48.292 (292950000)|SYSTEM_METHOD_EXIT|[40]|System.debug(ANY)
09:48:48.292 (292970000)|SYSTEM_METHOD_ENTRY|[41]|System.debug(ANY)
09:48:48.292 (292994000)|USER_DEBUG|[41]|DEBUG|----------------------------------lPCPrefixStr:901
09:48:48.293 (293001000)|SYSTEM_METHOD_EXIT|[41]|System.debug(ANY)
09:48:48.293 (293021000)|SYSTEM_METHOD_ENTRY|[42]|System.debug(ANY)
09:48:48.293 (293048000)|USER_DEBUG|[42]|DEBUG|-----------------------------------lStateStr:AR
09:48:48.293 (293055000)|SYSTEM_METHOD_EXIT|[42]|System.debug(ANY)
09:48:48.293 (293098000)|SYSTEM_METHOD_ENTRY|[43]|String.valueOf(Object)
09:48:48.293 (293160000)|SYSTEM_METHOD_EXIT|[43]|String.valueOf(Object)
09:48:48.293 (293183000)|SYSTEM_METHOD_ENTRY|[43]|System.debug(ANY)
09:48:48.293 (293192000)|USER_DEBUG|[43]|DEBUG|-----------------------------------lStratusProductSet:{Avance}
09:48:48.293 (293199000)|SYSTEM_METHOD_EXIT|[43]|System.debug(ANY)
09:48:48.293 (293234000)|SYSTEM_METHOD_ENTRY|[44]|String.valueOf(Object)
09:48:48.293 (293270000)|SYSTEM_METHOD_EXIT|[44]|String.valueOf(Object)
09:48:48.293 (293284000)|SYSTEM_METHOD_ENTRY|[44]|System.debug(ANY)
09:48:48.293 (293289000)|USER_DEBUG|[44]|DEBUG|------------------------------------lProspectTypeSet:{End User}
09:48:48.293 (293294000)|SYSTEM_METHOD_EXIT|[44]|System.debug(ANY)
09:48:48.294 (294011000)|SOQL_EXECUTE_BEGIN|[45]|Aggregations:0|select Owner__c, Country__c, Prospect_Record_Type__c, Postal_Code_Prefix__c, State_Province__c, Stratus_Product__c, Prospect_Type__c from Prospect_Assignment__c where (Active__c = true and Country__c includes (:tmpVar1) and Prospect_Type__c = :tmpVar2 and Stratus_Product__c = :tmpVar3)
09:48:48.304 (304107000)|SOQL_EXECUTE_END|[45]|Rows:2
09:48:48.304 (304237000)|SYSTEM_METHOD_ENTRY|[46]|LIST.iterator()
09:48:48.304 (304383000)|SYSTEM_METHOD_EXIT|[46]|LIST.iterator()
09:48:48.304 (304406000)|SYSTEM_METHOD_ENTRY|[46]|system.ListIterator.hasNext()
09:48:48.304 (304419000)|SYSTEM_METHOD_EXIT|[46]|system.ListIterator.hasNext()
09:48:48.304 (304431000)|SYSTEM_METHOD_ENTRY|[46]|system.ListIterator.next()
09:48:48.304 (304442000)|SYSTEM_METHOD_EXIT|[46]|system.ListIterator.next()
09:48:48.304 (304465000)|SYSTEM_METHOD_ENTRY|[47]|LIST.iterator()
09:48:48.304 (304559000)|SYSTEM_METHOD_EXIT|[47]|LIST.iterator()
09:48:48.304 (304578000)|SYSTEM_METHOD_ENTRY|[47]|system.ListIterator.hasNext()
09:48:48.304 (304589000)|SYSTEM_METHOD_EXIT|[47]|system.ListIterator.hasNext()
09:48:48.304 (304599000)|SYSTEM_METHOD_ENTRY|[47]|system.ListIterator.next()
09:48:48.304 (304624000)|SYSTEM_METHOD_EXIT|[47]|system.ListIterator.next()
09:48:48.304 (304731000)|SYSTEM_METHOD_ENTRY|[64]|String.valueOf(Object)
09:48:48.305 (305134000)|SYSTEM_METHOD_EXIT|[64]|String.valueOf(Object)
09:48:48.305 (305155000)|SYSTEM_METHOD_ENTRY|[64]|System.debug(ANY)
09:48:48.305 (305162000)|USER_DEBUG|[64]|DEBUG|----------------ld:Lead:{View_Terms_and_Conditions__c=_HL_ENCODED_/resource/1283538857000/DealRegistrationTermsandConditions_HL_Click to view_HL__Blank_HL_, RecordTypeId=01260000000Q32MAAS, LastModifiedByID=005600000018Vhm, LastTransferDate=2011-11-04 00:00:00, Stratus_Product_s__c=Avance, jigsaw_clean__Sync_Status_Indicator__c=_IM1_/resource/jigsaw_clean__unmatched_IM2_U_IM3_ Not Found, LastModifiedDate=2011-11-04 13:47:37, Prospect_Type__c=End User, LastName=adminnn, Days_Since_Last_Acitivity__c=0.0, DoNotCall=false, CreatedByID=005600000018Vhm, jigsaw_clean__Jigsaw_Sourced__c=0.0, jigsaw_clean__Sync_Status_Summary__c=Not Found, Decision_Time_Frame_Followup_date__c=2011-11-04 13:48:48, Hidden_Is_Converted_Opportunity__c=Yes, CurrencyIsoCode=USD, Sales_Region__c=AMER, jigsaw_clean__Automatic_Updates__c=Unlocked, Postal_Code_Prefix__c=901, HasOptedOutOfEmail=false, jigsaw_clean__Automatic_Updates_Disabled__c=false, Sales_Territory_US__c=SOUTH, Country=United States, jigsaw_clean__Fresher__c=N, Lead_Status_Grouping__c=Qualified, Last_Activity__c=2011-11-04 00:00:00, Lead_ID__c=003030, jigsaw_clean__Jigsaw_Managed__c=Unmanaged, Converted_Default_Stage__c=Opportunities Identified, CreatedById=005600000018VhmAAE, IsDeleted=false, Id=00QP0000002dhMRMAY, IsConverted=false, jigsaw_clean__Graveyard__c=false, HasOptedOutOfFax=false, OwnerId=005600000018VhmAAE, Do_Not_Send_Snail_Mail__c=false, Interest__c=false, IsUnreadByOwner=false, Active_Business_Plan__c=_IM1_/img/samples/color_red.gif_IM2_Yes_IM3__15_IM4_15_IM5_, jigsaw_clean__Duplicate__c=None Found, SystemModstamp=2011-11-04 13:47:37, FirstName=Serviceee, jigsaw_clean__Jigsaw_Managed_Backend__c=0.0, Lead_Status_Changed_Date__c=2011-10-31 00:00:00, Company=prospective partner 2, jigsaw_clean__CRM_Last_Modified__c=2011-11-04 13:47:37, jigsaw_clean__Silent_Update__c=false, LastModifiedById=005600000018VhmAAE, Title=title, Status=Marketing Qualified, Marketing_Permission_Granted__c=false, PostalCode=90121, State=AR, CreatedDate=2011-10-31 13:08:43, Lead_Score__c=0.0, I_agree_to_the_Terms_and_Conditions__c=false, Hidden_Is_Converted_Account__c=Yes, Lead_Marketability__c=2.5}
09:48:48.305 (305181000)|SYSTEM_METHOD_EXIT|[64]|System.debug(ANY)
09:48:48.305 (305256000)|SYSTEM_METHOD_ENTRY|[46]|system.ListIterator.hasNext()
09:48:48.305 (305270000)|SYSTEM_METHOD_EXIT|[46]|system.ListIterator.hasNext()
09:48:48.369 (305294000)|CUMULATIVE_LIMIT_USAGE
09:48:48.369|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 1 out of 100
  Number of query rows: 2 out of 50000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 0 out of 150
  Number of DML rows: 0 out of 10000
  Number of script statements: 25 out of 200000
  Maximum heap size: 0 out of 6000000
  Number of callouts: 0 out of 10
  Number of Email Invocations: 0 out of 10
  Number of fields describes: 0 out of 100
  Number of record type describes: 0 out of 100
  Number of child relationships describes: 0 out of 100
  Number of picklist describes: 0 out of 100
  Number of future calls: 0 out of 10

 

I can see all the field values before the SOQL, we can see the debug messages. 
But I could not iterate those ones in the for loop.
When testing with SOQl, I put one field and tested. 3 fields are iterated over for loop, they are Country, Stratus_Product__c and Prospect_Type__c.
But I would like to see 2 more fields like this, they are 'State' & 'Postal_Code_Prefix__c'.
They are coming infront of SOQL, but not Iterating through for loop and not updating Lead Owner.

I thouht, is there any problem with if conditions in for loop?

Any Help would be appreciated...

 



  • November 04, 2011
  • Like
  • 0

Hi All,

   Actually i want to query on Account and User .....where account.ownerid==user.id  how can i?

Getting this error when changing I try to change the Name field from Text to AutoNumber.

 

Error: Cannot change Record Name type to autonumber; field update exists.

 

Any Ideas? Thanks in advance. 

  • February 24, 2010
  • Like
  • 0

In Winter 10.

 

I have a batch apex that could potentially return at least  250000 records. 

 

Documentation says that batch jobs using a query locator can return 50 million records.

 

But, the batch job that I have does not work if the query returns even 20000 records.

 

Anyone with the same issue? 

  • October 01, 2009
  • Like
  • 0

In sandbox that got upgraded to winter 10.

 

I am trying to return a Database.QueryLocation from the start method.

 

The release notes and the documentation for winter 10 clearly says that I can return either iterable or QueryLocator. But, in my code if  I say something like 

 

global Database.QueryLocator start(Database.BatchableContext ctx)

{

return Database.getQueryLocator('Some query here'); 

 

It does not compile.

  

  • September 22, 2009
  • Like
  • 0

Hi all,

 

I currently have a method which simply calls an @future method 10 times. The method that it calls updates the database and stops. The problem is that the first methods dataset doesn't appear to get updated when the @future method fails. I have tried adding a wait to the code by using:

 

 

 

while (iCount < 10) {

runFuture();

 

Double dMilliUntil = System.Now().millisecond() + 100;

while (System.Now().millisecond() <= dMilliUntil ) { } //Wait for 1 second

 

iCount++;

}

 

which waits for 1 second (which should be long enough for the future method to complete). Does anyone know why this doesn't update the original dataset?

 

Thanks

 

James 

 

http://www.astitch.net/backupimport/

 

Take a look at this tool which is being used by customers in Australia to solve the problem of loading related records. Any feedback is welcome...