• ehrenfoss
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 8
    Replies
I notied an issue with the {!listviewoptions} available on a list view in VisualForce.  Related to this thread:

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=7723

I defined a set of filters, and also defined permissions on those filters so that, say, half of them were for Customer Portal users and the other half were for System Administrators.  However, when you use {!listviewoptions} in VisualForce, a la

Code:
   <apex:selectList id="viewList" size="1" value="{!filterId}">
    <apex:actionSupport event="onchange" status="listStatus" rerender="aarList" />
     <apex:selectOptions value="{!listviewoptions}" /> 
     <!--<apex:selectOptions value="{!ViewSelectOptions}" /> -->
   </apex:selectList>

 Then you get the whole list, and it does not pre-filter the filters, so to speak, by the user's profile.  Maybe this is a bug, maybe it's intentional.  Either way, it is proving extremely difficult to elegantly get around this problem.   Is this a bug?  How would you solve it?  I've looked into a variety of solutions, and I'm trying to avoid building out a custom SetController extension just for this. 

I have a tabPanel, each tab includes a VisualForce page.  I'm switching tabs via Javascript, bypassing the default SF tab navigation.  For all tabs other than the activeTab defined in the tabPanel, however, the Multi-Picklist fields are formatted badly.  They are very narrow and are rendred with "width:35px" which as far as I know cannot be overridden.

I saw in other posts in the discussion board that dynamically changing the activeTab in the tab panel (via a response from the controller, for example) is a known issue.  Is there any way to cause the Multi-picklists to all be styled as if they are on the active tab? 
I'm developing a very large visualforce pageset.  The main page has a tabPanel and a bunch of tabs, but when I try to add the last tab - each tab includes a VisualForce page - I get this error:

Save error: SOQL statements can not be longer than 10000 characters

I'm aware of the SOQL limitation, but I'm not doing any SOQL whatsoever.  It's just VisualForce, a few AJAX calls, that's it.  And I don't get this error while using the page, only when trying to save it in the Eclipse IDE or in the SalesForce Develop -> Pages area. 

Is there any way to get information on how many characters over 10,000 I am?  Is it counting all the characters in the VisualForce pages? 

I did a character count on the src/pages directory and there are more than 250,000 characters total, and 10,290 'words'.  Does anybody know how this works under the hood and what I need to do to avoid it? 


I'm trying to dynamically access a set of VisualForce elements:

function addClassToFields(string, class){
    ids = string.split(',');
    for(var x=0;x<ids.length;x++){
        obj = document.getElementById(ids[x]);
        if (obj) {
            classname = obj.className;
            obj.className =  classname + ' ' + class;

        }
    }
}

This function receives a set of IDs, comma separated, and tries to add an additional style class to them.  I know the recommended method for looking up the actual IDs is something like

obj = document.getElementById({!$Component.lookingForThisId});

is there any way to drop back into Javascript within {! }, so I can append the ID I want to $Component....?  Something like

var myid = 'fieldName';
obj = document.getElementById({!Component.jsExec('myid')});

Maybe?

Hello,

 

I am planning to do a insert of a large number of records that are inside of a CSV file. In the past we have provided the client a solution of using a Java program that reads the CSV file and makes the Insert by making use of Salesforce API.

However, now that the batch mode is available I was wondering if we can make use of it in this perticular scenario. Is there a way that we can can parse a large CSV file and insert records into Salesforce using salesforce batch mode.

Right now it appears that the batch mode can only run on records that are already inserted into Salesforce. I want the other way round, I want batch mode to be operational on records that are yet to be inserted into Salesforce. 

It some one already did this, please post the code and I guess it woud be helpfull for lot of people who are running in this issue. 

I am developing an Apex class to create records by parsing a .csv file.  

I was expecting a CSV file to appear as a textAttachment in the email object. The MIME type for a CSV file is (according to RFC 4180) is text/csv. This actually appears as a binaryAttachment with MIME type application/vnd.ms-excel. I am saving the file as CSV (comma separated values) in Excel

 

Is there a way to get a CSV file as a text attachment (whose body is then a Apex String instead of a blob)?  

Any pointers would be greatly appreciated.

 

Thanks.  

 

 

  • March 04, 2009
  • Like
  • 0

An internal server error has occurred

 

An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using Salesforce!

Error ID: 1973761023-277 (48984707)

 

 

I'm terrified by this error .. I get this when I fire Save from VF page created using TASK standard Controller.

 

whenever this error pops up, it just display a Full WHITE page with the Above Specified Error text, and Nothing Else.

  • January 23, 2009
  • Like
  • 0
I have a tabPanel, each tab includes a VisualForce page.  I'm switching tabs via Javascript, bypassing the default SF tab navigation.  For all tabs other than the activeTab defined in the tabPanel, however, the Multi-Picklist fields are formatted badly.  They are very narrow and are rendred with "width:35px" which as far as I know cannot be overridden.

I saw in other posts in the discussion board that dynamically changing the activeTab in the tab panel (via a response from the controller, for example) is a known issue.  Is there any way to cause the Multi-picklists to all be styled as if they are on the active tab? 
I'm trying to figure out how to access the labels for specific fields in a custom object.  The following code works great for this:
Code:
String mylabel = Schema.SObjectType.SFDC_Target_Company__c.fields.Analyst__c.getLabel();

 
The issue is that the field that I want to get the label for is variable.  So I want to have more of a lookup function to get the label.  Trying
Code:
String analyst = 'Analyst__c';
String mylabel = Schema.SObjectType.SFDC_Target_Company__c.fields.analyst.getLabel();

Does not work, since it does not pull 'Analyst__c' from the variable analyst.  I tried getting all of the fields from my object so I could cycle through and compare the field name, then pull the label out of the correct one, but Field is apparently an invalid type. 

How can I find the label for these fields? 

For reference, below is a snippet of my code that shows how I'm getting the fields that I need labels for (it's for history tracking):

Code:
Public List<List<SFDC_Target_Company__History>> listHistory {
  get{
   if(listHistory == null){
 listHistory = new List<List<SFDC_Target_Company__History>>();
 List<SFDC_Target_Company__History> tempHistory = new List<SFDC_Target_Company__History>();
 for(ID i : projects.keySet()){
  tempHistory = [select ParentId,Field,NewValue,OldValue,CreatedDate, Parent.Name  from SFDC_Target_Company__History where ParentId = :i and Field != 'created' Order by CreatedDate desc];
  listHistory.add(tempHistory);
 } 
    }
    return listHistory;
   }
   set;
}

 

 

I'm developing a very large visualforce pageset.  The main page has a tabPanel and a bunch of tabs, but when I try to add the last tab - each tab includes a VisualForce page - I get this error:

Save error: SOQL statements can not be longer than 10000 characters

I'm aware of the SOQL limitation, but I'm not doing any SOQL whatsoever.  It's just VisualForce, a few AJAX calls, that's it.  And I don't get this error while using the page, only when trying to save it in the Eclipse IDE or in the SalesForce Develop -> Pages area. 

Is there any way to get information on how many characters over 10,000 I am?  Is it counting all the characters in the VisualForce pages? 

I did a character count on the src/pages directory and there are more than 250,000 characters total, and 10,290 'words'.  Does anybody know how this works under the hood and what I need to do to avoid it? 


Hi all,

I am new for Apex development. So please help me out. Any help will be appreciable.
Currently I am using a function in our application in which I am retrieving data from external web services and storing it in Salesforce database. I am calling this function in a ‘for’ loop because this is getting called multiple times based on the selection of checkboxes. At 1st time, this function is working properly but 2nd time, It's giving exception which is as follows:
ERROR: System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out.

Below is the function which is getting called multiple times:
WebService static void getContent(String id)
{
    String response = '';
    Http h = new Http();
    HttpRequest req = new HttpRequest();
    String url = 'url of the web service';
    req.setEndpoint(url);
    req.setMethod('GET');
    HttpResponse res=null;
    try {
        res= h.send(req);
    } catch(System.CalloutException e) {
    System.debug('ERROR: '+ e);
}

Thanks,
Manjiri