• sri14
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 11
    Replies

Plz I need apex batch class for below requirement

'fetched query results can we put directly into .xls'

 

 

Thank you for your time!

 

Sincerely

sri

  • April 15, 2012
  • Like
  • 0

Can you please look into them  and see what can be done in SFDC?

 

Thank you for your time!

 

Sincerely

sri

  • April 15, 2012
  • Like
  • 0

Hi All,

 

I created a batch class, which will generate the .xls file(of data related to Accounts).

I need to send the attachement/file directly to FTP server link (not from my desktop/local path, directly how can i link, from batch class to FTP) .

 

Is it possible directly sending sending file to FTP server link,

 

FYI,

step1: i configured the one of FTP server.

                                    ( FTP server is using as shared location, from where any external user can access the shared file)

step2: The generated .xls file from batch class, saving at my local pc.

step3: The file and FTP server is in one pc, so i can browse easly to share, the FTP server. but

 

issue is: As an external user can have FTP server but  how he can access my file ( he does not have access to my pc).

 

How can i send generated .xls file ( which was generated from salesforce batch class) directly to FTP server link, inorder to access external user/system.

 

Thanks in advance.

cheers,

sri

 

 

  • April 28, 2012
  • Like
  • 0

Plz I need apex batch class for below requirement

'fetched query results can we put directly into .xls'

 

 

Thank you for your time!

 

Sincerely

sri

  • April 15, 2012
  • Like
  • 0

Can you please look into them  and see what can be done in SFDC?

 

Thank you for your time!

 

Sincerely

sri

  • April 15, 2012
  • Like
  • 0

 

I have apex  batch class

  

global class apexBatch implements Database.Batchable<sObject>{
 global final string query;
List<user>  lstUser= new List<user>();
Set<id>     setUserID= new Set<id>();



//constructor
global apexBatch () {
    if (system.Test.isRunningTest())
    {
        this.query='SELECT id FROM user limit 100';
    }
    else
    {
        this.query='SELECT id FROM user ;
    }
}


global Database.QueryLocator start(Database.BatchableContext BC) {

    return Database.getQueryLocator(query);
}

global void execute(Database.BatchableContext BC, List<sObject> scope) {

// do some processing


}

global void finish(Database.BatchableContext BC) {

}

 I am calling this class from test class using this code

 

 Test.startTest(); 
    apexBatch ba = new apexBatch();

    Database.executeBatch(ba);
      Test.stopTest();

 

When i check the code coverage i can only see that the constructor is covered, the start and execute methods are not covered at all.

Any idea what could cause this

Thanks

On a VF page, I have a pageBlockTable.  There are times where there are more than 1000 records in the collection to be rendered.  When this occurs, the Visualforce collection limit of 1000 is hit and the page doesn't load.  I need to figure out a creative solution for getting around this.  In the end...

 

  1. I need all records to render on the page. If I do any pagination, it'll happen client-side after the records are loaded in the HTML.  I know the first responses to this will be about whether I really need to have all those records on the page and how there is doubt about whether I need to, but for the purposes of this forum post, please work with me here.
  2. I want to keep the look and feel of a pageBlockTable if possible.

 

When not using pageBlockTables, I have used a construct similar to the following to get through a collection of more than 1000 items.

 

<apex:repeat value="{!myCollection}" var="item" rows="1000" first="0">
{!item.text}
</apex:repeat>
<apex:repeat value="{!myCollection}" var="item" rows="1000" first="1000">
{!item.text}
</apex:repeat>
<apex:repeat value="{!myCollection}" var="item" rows="1000" first="2000">
{!item.text}
</apex:repeat>

 

pageBlockTable has the rows and first parameters, but if I do that, I'd be getting a new pageBlockTable everytime.

 

The options I can think of are:

 

  • Get a creative solution from the forums to actually utilize the pageBlockTable (purpose of this post)
  • Use apex:dataTable and try to use style classes to mimix the pageBlockTable look and feel. This is a nice possibility I haven't tried yet.
  • Use apex:repeat tags and make up my own HTML styling

 

Any help is appreciated.

 

 

  • September 13, 2010
  • Like
  • 0

Hello Friends,

 

I have a requirement wherein the users will click on a button and a CSV file should be generated with some data. Now this file should be automatically sent to an FTP server in real time.

 

Can this be achieved in salesforce by any means?

 

Please Help!

Cool_D

Hi,

 

I have an intersting  task. As we know sf provids uploading document function.

 

we want to mock this function. Supposing user logins to SF and select file from local matchine (in the intranet network) to upload, after the save button is clicked, instead of uploading file to SF, the file, in fact, is moved from local matchine to another file server(in the same domain  in intranet network).

 

in addition, user can click the link in the document record to view the file's content.

 

Any guys have any ideas to make this happen?

 

I am planning to run an web service to move files in the intranet, and expose the function to SF.

 

Is it available?

 

Thanks

I am using mass e-mail JAVA API. The e-mail is sent to respective ids but attachment is sent as "HTML" instead original format of "PDF"
 
Any reason why API would send as HTML
 
thanks

Message Edited by SFDC Admin on 11-14-2007 07:44 AM

Here is my java code....hope that helps

    MassEmailMessage[] messages = new MassEmailMessage[1];
    messages[0] = new MassEmailMessage(); 
    messages[0].setBccSender(bccSender);
    messages[0].setEmailPriority(EmailPriority.Normal);
    messages[0].setReplyTo(replyTo);
    messages[0].setSaveAsActivity(saveAsActivity);
    messages[0].setSubject(emailSubject);
    messages[0].setUseSignature(useSignature);
    messages[0].setTemplateId(new ID(templateId));
  
   
    ID[] contactIds = new ID[1];
   
    contactIds[0] = new ID(contactId);
   
    //verify contact id is not null prior to attempting email
    if(contactIds[0]!=null) {
     messages[0].setTargetObjectIds(contactIds);

     try {
        SendEmailResult[] result = sfdc.sendEmail(messages);
    }

 

Message Edited by SFDC Admin on 11-14-2007 08:00 AM

I am trying to send emails using the 'sendMail' call. to achieve this I have upgraded to the v10 wsdl. I can now use the call but recieve the follwing error from the endpoint:

'UNSUPPORTED_API_VERSION: This call requires a minimum API version of 9.0. Please upgrade to the latest version of the WSDL.'

Any ideas?
Hi,

I was trying to figure out how to get the information out of EmailStatus.  The document I found is:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_emailstatus.htm?Highlight=EmailStatus

I tried to send a DescribeSObject message on "EmailStatus", but the result was a list of fields (not a list of query results).  If I try to run a query, I get an error.  What am I doing wrong?  I'm trying to figure out the number of times the recipient opened an email.

I've been doing my development using Java, and cross-posted there as well.  I thought I'd check here, as this might be client-side independent...

Thanks,

Will