• Sathyaincampus
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 27
    Replies

Hello Everyone,

 

I am using export to excel functionality in my application. It is working fine if list contains less than 1000 records and not working if list is having more than 1000. 

 

When I have done R&D, I found that we can store more than 1000 records in List but if we are going to use it in VF page or DataTable of VF page it gives me exception that 'Collection size 1,007 exceeds maximum size of 1,000'.

 

We can use pagination in this functionality, but it is Separating excel sheet for each page, Which is not a client requirement. Client wants all records in a single excel sheet.

 

So Please suggest me a solution.

 

Regards,

Ashes

I'm trying to find a solution that allows me to access sharepoint document libraries from within Salesforce.com. I don't want to replicate any documents into salesforce, they must stay physically located on my sharepoint library but I want to be able to access them from salesforce.com

 

Does anybody here know how I can do this?

I have been searching for a solution to this without success. I can't find a way to implement pagination with more than 10000 records. I've been using StandardSetController but this don't works with more than 10000 records. I've been looking into the batchable interface but not quite sure how to implement this.


Just to be sure, is there a way that I can process more than 10000 records in a StandardSetController ?


Is there other way I can implement a pagination in where my custom object have more than 10000 records. (probably more than 50000 actually)Thanks.Joaquin

 

Has anyone got validation with JQuery working on drop down lists on a visualforce page, as I currently can only validate input fields, although my code works fine on a normal HTML page. I've added the JQuery noConflict function and stripped out any colons in the id name of the form etc... Anyone has any joy sure let me know, thanks:

 

<apex:page sidebar="false" showheader="false" standardstylesheets="false">

 <apex:includeScript value="{!URLFOR($Resource.JQuery2, 'jquery.js')}"/>
 <apex:includeScript value="{!URLFOR($Resource.JQuery2, 'jquery.validate.js')}"/>
 <apex:includeScript value="{!URLFOR($Resource.JQuery2, 'jquery.maskedinput-1.0.js')}"/>
 <apex:includeScript value="{!URLFOR($Resource.JQuery2, 'ui.core.js')}"/>
 <apex:includeScript value="{!URLFOR($Resource.JQuery2, 'ui.accordion.js')}"/>

<script type="text/javascript">
 var j$=jQuery.noConflict();
 
j$(document).ready(function(){

    function jq(myid) {
          return '#' + myid.replace(/(:|\.)/g,'\\\\$1');
       }
       
    var f = '{!$Component.cmaForm}';

    j$("#recordClientPhone").mask("(999) 999-9999");
    j$("#recordClientPhoneAlt").mask("(999) 999-9999");
    j$("#recordClientZip").mask("99999");
    j$("#recordPropertyZip").mask("99999");  
    j$("#recordPurchaseZip").mask("99999");  

    // add * to required field labels
    j$('label.required').append('&nbsp;<strong>*</strong>&nbsp;');

    // accordion functions
    var accordion = j$("#stepForm").accordion();
    var current = 0;
    
    j$.validator.addMethod("pageRequired", function(value, element) {
        var j$element = j$(element)
        function match(index) {
            return current == index && j$(element).parents("#sf" + (index + 1)).length;
        }
        if (match(0) || match(1) || match(2)) {
            return !this.optional(element);
        }
        return "dependency-mismatch";
    }, j$.validator.messages.required)

    
    var v = j$(jq(f)).validate({
        errorClass: "warning",
        onkeyup: false,
        onblur: false,
        submitHandler: function() {
            alert("Submitted, thanks!");
        }
    });
    
    // back buttons do not need to run validation
    j$("#sf2 .prevbutton").click(function(){
        accordion.accordion("activate", 0);
        current = 0;
    });
    j$("#sf3 .prevbutton").click(function(){
        accordion.accordion("activate", 1);
        current = 1;
    });
    // these buttons all run the validation, overridden by specific targets above
    j$(".open2").click(function() {
      if (v.form()) {
        accordion.accordion("activate", 2);
        current = 2;
      }
    });
    j$(".open1").click(function() {
      if (v.form()) {
        accordion.accordion("activate", 1);
        current = 1;
      }
    });
    j$(".open0").click(function() {
      if (v.form()) {
        accordion.accordion("activate", 0);
        current = 0;
      }
    });
 
});
</script>

 <apex:stylesheet value="{!URLFOR($Resource.JQuery2, 'style.css')}"/>
 <apex:stylesheet value="{!$Resource.InsuranceCSS}"/>
 <style type="text/css">
.defaultTableColor {
    background-color: white;
}
.tableRollOverEffect1 {
    background-color: #FAF0E6;
    color: #FFF;
}
.tableRollOverEffect2 {
    background-color: #FAF0E6;
    color: #FFF;
}
.tableRowClickEffect1 {
    background-color: #fe0012;
    color: #FFFFFF;
}
.tableRowClickEffect2 {
    background-color: #00F;
    color: #FFF;
}
</style>


<apex:form title="cmaForm" id="cmaForm" >

I would like to make content workspace files available on a force.com site page ( for un-authenticated user). Is this possible ?

 

If the answer is yes, then where and how do I set content workspace permission for un-authenticated user. In the workspace permission menu, I do not see an option to include unauthenticated user for view permission.

I do not want to use cutomer portal or  partner portal for this purpose. Thanks !

Guys, Any idea on date format cast function for SOQL? similar to convert(varchar,getdate(),106) in sql

Am trying to format the grid in asp.net using the output but since the output is returned as string it is difficult for me to format the date based on the culture info. and all my controls are created dynamically in the page which are queried using the partner wsdl. So I desperately need this. can someone help on this pls?

 

regards

Sathya

framing the soql from  the listview columns based on metadata fetch and querying it using the partner wsdl

 

 i queried an opportunities list view.. for example all opportunities it lists me columns like CORE.USER.ALIAS, FULL_Name, etc. How do i frame an SOQL by getting these column names.. 

for ex: am expecting the output like select core.user.alias,full_name,opportunity.name,account.name from opportunity

i should be able to query with the columns nodes available in the xml retrieved from the metadata call..

any ideas????

regards
sathya

 i need a current user filter in the view list that is being displayed in the top of every tab in SF.. for ex :- i have a recruiting app.. and each recruiter has their own login.. if they login to the system they should be able to see the positions only they are assigned to.. the information of which will be stored in the Recruiter field (not Owner) under position record. they are requesting that if they choose a view they should be able to see only that.. as per my understanding...there is no option like that in SF.. any ideas? similar to my positions which will be useful only for owner fields...

is there a way to map between the field name in the report meta data  to salesforce objects?

 

I'm using the Metadata Api to retrive metadata about a report

the result is something like this

 

<?xml version="1.0" encoding="UTF-8"?>
<Report xmlns="http://soap.sforce.com/2006/04/metadata">
    <columns>
        <field>SALUTATION</field>
    </columns>
    <columns>
        <field>FIRST_NAME</field>
    </columns>
    <columns>
        <field>LAST_NAME</field>
    </columns>
    <columns>
        <field>TITLE</field>
    </columns>
    <columns>
        <field>ADDRESS2_STREET</field>
    </columns>
    <columns>
        <field>ADDRESS2_CITY</field>
    </columns>
    <columns>
        <field>ADDRESS2_STATE</field>
    </columns>
    <columns>
        <field>ADDRESS2_ZIP</field>
    </columns>
    <columns>
        <field>ADDRESS2_COUNTRY</field>
    </columns>
    <columns>
        <field>PHONE1</field>
    </columns>
    <columns>
        <field>PHONE3</field>
    </columns>
    <columns>
        <field>PHONE2</field>
    </columns>
    <columns>
        <field>EMAIL</field>
    </columns>
    <columns>
        <field>OWNER_FULL_NAME</field>
    </columns>
    <columns>
        <field>ACCOUNT.NAME</field>
    </columns>
    <columns>
        <aggregateTypes>Sum</aggregateTypes>
        <field>SALES</field>
    </columns>
    <columns>
        <field>Account.Active__c</field>
    </columns>
    <filter>
        <criteriaItems>
            <column>SALES</column>
            <operator>greaterThan</operator>
            <value>40000000</value>
        </criteriaItems>
    </filter>
    <format>Tabular</format>
    <name>muly1</name>
    <reportType>ContactList</reportType>
    <scope>my</scope>
    <showDetails>true</showDetails>
    <timeFrameFilter>
        <dateColumn>CREATED_DATE</dateColumn>
        <interval>INTERVAL_CUSTOM</interval>
        <startDate>2008-08-05</startDate>
    </timeFrameFilter>
</Report>

 

what is ContactList?

what is ADDRESS2_STREET?

 

 

I have some test code that creates a portal user. The insert fails with the message "portal account owner must have a role".  

 

The owner of the Account and Contact has a Role, so I'm not sure what to do with this message.  

 

Anyone know how this can be fixed?

I have a problem regarding salesforce email under apex area.

The problem is using 'Html Email Templates' with setTargetObjectId method does not set the User Id:

 

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); logger.log('User found: ' + caseR.User__c); mail.setTargetObjectId(caseR.User__c); mail.setTemplateId('00XT0000000iwz7'); Messaging.Sendemailresult[] emailResult = Messaging.sendEmail(new Messaging.Email[] { mail } , false); logger.log('Email Result: ' + emailResult);

 

And the logging result says that TargetObjectId is null. Why?:

 

2/01/2010 09:15: User found: 00520000000pjkYAAQ 12/01/2010 09:15: Email Result: (Messaging.SendEmailResult[getErrors=(Messaging.SendEmailError[getTargetObjectId=null;]);isSuccess=false;])

 

Please help!

 

thanks,

Cristina.

Hello Everyone,

 

I'm trying to make some files we uploaded into salesforce crm content downloadable or accessible by another page via Sites. For instance, say, an mp3, either downloaded or requested by mediaplayer on a webpage.

 

According to the docs 'To download a document via the API, you must export the VersionData of the document.'

 

Well... I've tried a couple variations with a visualforce page to retrieve/export the contentversion, but (as expected) no luck.

 

Does anyone have any good ideas on how to do this?

 

Thanks in advance,

e.

I'm trying to use a Report's metadata to create a SOQL query that pulls back the same data that's in the report. I'm stumped on what I assume are calculated fields.

The metadata is (with a couple of irrelevant fields removed for brevity)
<Report xmlns="http://soap.sforce.com/2006/04/metadata">
<columns> <field>SUBJECT</field> </columns>
<columns> <field>CREATED_DATE</field> </columns>
<columns> <field>AGE</field> </columns>
<columns> <field>OPEN</field> </columns>
<columns> <field>CLOSED</field> </columns>

<format>Tabular</format>
<name>Total Cases Created</name>
<params>
<name>units</name>
<value>h</value>
</params>
<reportType>CaseList</reportType>
<scope>user</scope>
<showDetails>true</showDetails>
</Report>


Problem 1: I see reportType is CaseList, and my human brain can make the leap that the "Master" table (not sure if that's the right term) for this report is Case. How can my code know that though?


Problem 2: I use binding.describeSObject() and DescribeSObjectResult.getFields() to get the field names for Case, there is no Age, no Open, and no Closed. There's IsClosed, which my human brain maps to Closed. And I figure Age is calculated from current time minus CreatedDate and Open is calculated from !IsClosed. But when I try to use, e.g. Age in the query, I get

select Subject, CreatedDate, Age, IsClosed, Account.Name from
                             ^
ERROR at Row:1:Column:30
No such column 'Age__c' on entity 'Case'.
If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. 

 I tried Age__c, but of course that didn't work, because apparently "custom" != "calculated".

So...
  1. Is there a way to find out a Report's Master table, programmaticaly?
  2. Is there a way to get the "real" column name--e.g. IsClosed instead of Closed?
  3. Is there a way to get the calculated fields?

Thanks,
Jeff