• Kumar Saurav 32
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 6
    Replies
I have tried to create a Batch Class on the ContentDocumentLink. The querylocator in the start method is returning some records but it is not able to execute the execute() method. I am getting Internal Salesforce.com Error. May I know is there any limitations to this object?

Here is the code snippet I am using:
 
global class CommunityActivityJob implements Database.Batchable<sObject>,Database.AllowsCallouts ,Database.Stateful {
    global Database.QueryLocator start(Database.BatchableContext BC) {
    List<String> linked = new List<String>();
    linked.add('00528000000M2xj');
       String query = 'Select Id, ContentDocumentId, LinkedEntityId, ShareType, Visibility from ContentDocumentLink Where LinkedEntityId In :linked ';
        System.debug('===START==='+Database.query(query));
        return Database.getQueryLocator(query);
    }
     global void execute(Database.BatchableContext BC, List<sObject> scope) {
        System.Debug('===INSIDE EXECUTE==='+scope);
        }
    global void finish(Database.BatchableContext BC) {
        System.debug('===Inside Finish===');
    }

 
I have tried to create a Batch Class on the ContentDocumentLink. The querylocator in the start method is returning some records but it is not able to execute the execute() method. I am getting Internal Salesforce.com Error. May I know is there any limitations to this object?

Here is the code snippet I am using:
 
global class CommunityActivityJob implements Database.Batchable<sObject>,Database.AllowsCallouts ,Database.Stateful {
    global Database.QueryLocator start(Database.BatchableContext BC) {
    List<String> linked = new List<String>();
    linked.add('00528000000M2xj');
       String query = 'Select Id, ContentDocumentId, LinkedEntityId, ShareType, Visibility from ContentDocumentLink Where LinkedEntityId In :linked ';
        System.debug('===START==='+Database.query(query));
        return Database.getQueryLocator(query);
    }
     global void execute(Database.BatchableContext BC, List<sObject> scope) {
        System.Debug('===INSIDE EXECUTE==='+scope);
        }
    global void finish(Database.BatchableContext BC) {
        System.debug('===Inside Finish===');
    }

 
I have tried to create a Batch Class on the ContentDocumentLink. The querylocator in the start method is returning some records but it is not able to execute the execute() method. I am getting Internal Salesforce.com Error. May I know is there any limitations to this object?

Here is the code snippet I am using:
 
global class CommunityActivityJob implements Database.Batchable<sObject>,Database.AllowsCallouts ,Database.Stateful {
    global Database.QueryLocator start(Database.BatchableContext BC) {
    List<String> linked = new List<String>();
    linked.add('00528000000M2xj');
       String query = 'Select Id, ContentDocumentId, LinkedEntityId, ShareType, Visibility from ContentDocumentLink Where LinkedEntityId In :linked ';
        System.debug('===START==='+Database.query(query));
        return Database.getQueryLocator(query);
    }
     global void execute(Database.BatchableContext BC, List<sObject> scope) {
        System.Debug('===INSIDE EXECUTE==='+scope);
        }
    global void finish(Database.BatchableContext BC) {
        System.debug('===Inside Finish===');
    }