• Ralph Callaway
  • NEWBIE
  • 175 Points
  • Member since 2008

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

I have a relatively simple visualforce page following all the listed best practices (avoided multiple component controllers, use transient, don't use multiple forms, etc.) for managing view state, but I'm continually getting view state limit exceeded errors.  Trouble is, my controller and my variables only account for a paltry 15KB out of the 135KB limit with the mysterious "Internal" section taking over 90KB.  

 

WTF*&$!!@#  How is one supposed to go about optimizing a page when we don't have any idea what is in there!  Please help.

 

For full details, please see my post on Salesforce Stackexchange for a full discussion ...

 

Product Management!  R&D! Tier 3! Please HELP!!  This is no beginner question, can someone in the know please help!  I'm offering a healthy bounty for your trouble!!!

 

Could this be a platform bug????????????

Has anyone experienced issues with Salesforce.com pages becoming unresponsive while using the old system log?  Typically I'll have the debug log running and then try and load a debug log, or execute some anonymous APEX and everything will crash.

I am trying to create a simple trigger that check is a field has updated and if so adds a datetime stamp in another field.

 

I am getting a read only error and I know it is because I am trying to update the trigger.old. The problem is I am new and do not know how to update the trigger.new. I assume you are supposed t switch back but I can not figure out how to do it

 

Here is my code so far

 

trigger CreateDispositionTimeStamp on Lead (after insert, after update)

{



for (Lead l : System.Trigger.new){

    Lead beforeUpdate = System.Trigger.oldMap.get(l.Id);
   if(l.Status != beforeUpdate.Status){
  
  l.Last_Disposition_Update__c=datetime.now();
   }
}
}

 

 

Any help would be appreciated.

Given that Salesforce does not give out line number/apex class where the crash happened in a managed package, how would one go about debugging where the crash came from when you have 1000's of lines of code. Anyone from salesforce care to shed light? Any hidden knobs, info in debug log? The only thing I can see in debug log is the last query that executed before the crash...nothing more....

 

 

 

 

 

 

 

Hello all,

 

I'm trying to make an application that allows the user to define certain settings and have them be re-used the next time the application is opened. I see that you can define custom settings:

 

https://login.salesforce.com/help/doc/en/cs_define.htm

 

But the method for doing so described there requires making changes in the Salesforce UI. I don't want my users to have to muck around with doing so; is there a way to have my application create the custom settings programmatically the first time it is run?

 

Alternatively is it possible to create a custom database object programmatically, and store the information that way?

 

Thanks!

we currently have a process that can print a word doc from a case which is sort of cool.

but we're looking for a way to print multiple docs instead of one at a time.

i dont want to loop through creating a doc for each one, like mulitple instances of word

Im lookg for a way to format the data so that it will open one word doc with mutliple pages to print them all at once

 

possible?

I'm trying to create a trigger that will fire on the insert/update of any object a User selects from a picklist in a custom VF page I made. Because it could be any object (either custom or standard), I can't just build a trigger the standard way. What I'm assuming is I'm going to have to pass the data into a class/function and that function will create the trigger. I've been looking around but I can't find a way to build a trigger within a class filled with the rest of the necessary data I need to populate the trigger. Is this even possible? If so, can someone point me in the right direction on this?

 

Thanks!

Alright, I have 3 objects set up.

A custom Pipeline Tracker object used to track certain deals

The standard Account Object

A custom Account Team object

 

Both my Pipeline Tracker and Account Team custom objects relate to the Account object on the Account Name.  I need to set up an SOQL statement pulling data from all the objects. About 90% will come from the Pipeline Object and only a handful of fields will come from the Account and Account Team objects.

 

As a test, I've been trying to call 3 fields. One field from each record.

I can successfully call "Category" from the Pipelline Tracker object, and I can successfully relate my Pipeline Tracker to the Account Object and pull the field "Sales Pole" from the Account Object. However, I'm stuck at how to then relate the Account object to my Account Team object and pull the field, "Sales Director". Does anyone know the proper syntax to successfully call a related record of a related record?

 

    List<Pipeline_Tracker_3__c> pipelineRecords = new List <Pipeline_Tracker_3__c>();

    public MultipleDBJoin()
    {
        buildList();
    }

    public void buildList()
    {
        for (Pipeline_Tracker_3__c pt: [SELECT Category__c, Account__r.Sales_Pole__c, Account__r.Account_Team__r.SD__c
        FROM Pipeline_Tracker_3__c])
        {
            pipelineRecords.add(pt);
        }
    }

 

Thanks,

Mike

We use custom settings in a SalesForce app. We access it like so:


    MySettings__c settings = MySettings__c.getOrgDefaults();

 

This was working fine, but today the app completely crashed. By that I mean the page doesn't load at all, I just get a white screen telling me an internal error occurred. We traced it down to this line of code - when it is commented out the page loads as well as it can without those settings (but at least it loads). 

 

Running that single line of code in the System Log (using the Execute functionality) also causes a report of Internal System Error. The only thing the system log reports is "FATAL_ERROR Internal Salesforce.com Error." The Apex code modal reports "Internal System Error: 1018505045-332 (-920440070)"

 

The setting has values for the organization - we've also tried deleting the settings and recreating them to no affect. So far SalesForce support has been no help beyond telling us to try posting here.

 

This is very frustrating as it was working fine on Friday and today it was broken before anyone touched anything.

Hi,

 I am trying to get the value of 3 fields and get the latest record by the contact id getting error, when I try to get the value of other field(Id) that is not in groupby clause

sobject[] res= [Select id,Contact__c,max(createddate) from Custom_Object__c group by Contact__c];

This is general syntax also in other sql. Dow to get the ID of the record which is the latest.

 

Is there any soql I can use which would give me the result with(ID, Contact__c)?

Contact__c could have multiple records.

 

 


.

 

 

It's great how you can query a single custom field from an object and not the whole enchilada.  Does anyone know if it's possible to pull just on custom label?

 

I've tried mucking around with package.xml, but without much luck and can't find anything on the forums.  My gut says this isn't possible but wanted to check with all the experts out there to see if someone has a workaround.

My controller works correctly, but when I go to test it I get an error and I'm not sure how to fix it.  Can anybody help?

 

static testMethod void testInquiryToProject()
  {
      List<Case> inquiries = [SELECT ID FROM Case LIMIT 1];
    
    if (inquiries.size() > 0)
    {
        Case inquiry = inquiries[0];
      ApexPages.StandardController controller = new ApexPages.StandardController(inquiry);
      controller.reset();
      InquiryToProjectExtension ext = new InquiryToProjectExtension(controller);
    }else
      System.debug('No Cases available');
  }

 

////////////////////////////////////////////////////////////////////////////////////

 

ublic InquiryToProjectExtension(ApexPages.StandardController cont)
  {
    List<String> fields = new List<String>();
    fields.add('Account');
    fields.add('CaseNumber');
    fields.add('Neighborhood_Lookup__c');
    fields.add('Sector__c');
    fields.add('Owner');
    fields.add('In_a_Main_Street_District__c');
    fields.add('Main_Street_Districts__c');
    cont.addFields(fields);//I get my error here when my test method executes
    inquiry = (Case)cont.getRecord();
    project = new Project__c(RecordType = [select id, name from RecordType where Name =: 'Grant'], Project_Account__c = inquiry.accountID, Neighborhood_Lookup__c = inquiry.Neighborhood_Lookup__c, Sector__c = inquiry.Sector__c, Project_Manager__c = UserInfo.getUserId(), In_a_Main_Street_District__c = inquiry.In_a_Main_Street_District__c, Main_Street_District__c = inquiry.Main_Street_Districts__c);
    controller = new ApexPages.StandardController(project);
  }

Hello,

 

just wanted to get a little info on how some of you might be using svn with your salesforce code.  I'm mainly interested in how you are storing the code in repositories.  Are you just keeping all of your apex code in a single repository, or breaking it up on a project by project basis?  

 

Thanks for any help!

I have a component that accepts a Boolean attribute. Certain combinations of inline functions generate the error message shown in the subject line. See code below for details:

 

<!-- this produces the error --> <c:myComponent myBooleanValue="{!LEN(myObj__c.myField__c) == 0}" .../> <!-- this produces the error --> <c:myComponent myBooleanValue="{!LEN(myObj__c.myField__c) = 0}" .../> <!-- this works! --> <c:myComponent myBooleanValue="{!NOT(LEN(myObj__c.myField__c) > 0)}" .../>

 

Obviously I have a workaround (the last example) but I'm curious to know why the other two do not work.