• tbrooks
  • NEWBIE
  • 50 Points
  • Member since 2019

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies

I am evaluating the tool to Generate Document in Salesforce.

I have user Drawloop Document Generation and I am Evalusting S-Docs

Is it possible to generate document in Salesforce native Soln without using Apps from app exchange?

Hello All,
Trying to figure out why I have no coverage for BatchableContext.
Here is the Class
global void execute(Database.BatchableContext BC, List<GridView__c> scope) {
        system.debug('scope ' + scope);
        for (GridView__c grid : scope) {
            grid.Public__c = false;
        }
        update scope;
    }

Here is the Test Class
private class MakePrivateTest {
    @istest
    private static void MakePrivateTestTrackers() {
        list<GridView__c> tList = new List<GridView__c>{
            new GridView__c(
                Name = 'test1',
                Public__c = false,
                LastViewedDate__c = null
            ),
            new GridView__c(
                Name = 'test2',
                Public__c = true,
                LastViewedDate__c = System.now().addHours(56 * -1)
            ),
            new GridView__c(
                Name = 'test4',
                Public__c = true,
                LastViewedDate__c = System.now().addHours(95 * -1)
            )
        };
        insert tList;

        test.startTest();
        SchedulableContext sc = null;
        tmp.execute(sc);
        MakePrivate tmp = new MakePrivate();
        ID batchprocessid = Database.executeBatch(tmp);
        test.stopTest();

       tList = [SELECT Id, Name, Public__c, LastViewedDate__c FROM GridView__c];
        system.assertEquals(3, tList.size());
    }
}

But no coverage for "global void execute(Database.BatchableContext BC"
ANy suggestions would be apreciated.
Thank you
P
 
I'm not sure if this should be solved w/ flow or programmatically....

over a 12 month period if a specified field has not been updated then a certain score is to be provided for the related account record.

For example if the specified field has been updated within 1-3 months, it is given a score of 5; was updated within 4-6 months, score of 4; updated within 7-8 months, score 3; updated 9-10 months, score 2; updated 11+ months score 1.... 

Looking for the best practice to solve for this. 

I am evaluating the tool to Generate Document in Salesforce.

I have user Drawloop Document Generation and I am Evalusting S-Docs

Is it possible to generate document in Salesforce native Soln without using Apps from app exchange?

trigger updatestageoncontact on Interview__c(after insert, after update){
 list<Id> contIds = new list<Id>();
 list<Contact> Contacts = new list<Contact>();
 for(Interview__c inte:trigger.new){
  contIds.add(inte.Candidate__c);
 }
 for(contact con:[select Id, Stage__c from contact where Id IN :contIds]){
  for(Interview__c inter:trigger.new){
   if(inter.Status__c=='Scheduled'){
    con.Stage__c='Interview Scheduled';
    Contacts.add(con);
   }
  }
 }
    update contacts;
}


How to write test class this trigger
Hello All,
Trying to figure out why I have no coverage for BatchableContext.
Here is the Class
global void execute(Database.BatchableContext BC, List<GridView__c> scope) {
        system.debug('scope ' + scope);
        for (GridView__c grid : scope) {
            grid.Public__c = false;
        }
        update scope;
    }

Here is the Test Class
private class MakePrivateTest {
    @istest
    private static void MakePrivateTestTrackers() {
        list<GridView__c> tList = new List<GridView__c>{
            new GridView__c(
                Name = 'test1',
                Public__c = false,
                LastViewedDate__c = null
            ),
            new GridView__c(
                Name = 'test2',
                Public__c = true,
                LastViewedDate__c = System.now().addHours(56 * -1)
            ),
            new GridView__c(
                Name = 'test4',
                Public__c = true,
                LastViewedDate__c = System.now().addHours(95 * -1)
            )
        };
        insert tList;

        test.startTest();
        SchedulableContext sc = null;
        tmp.execute(sc);
        MakePrivate tmp = new MakePrivate();
        ID batchprocessid = Database.executeBatch(tmp);
        test.stopTest();

       tList = [SELECT Id, Name, Public__c, LastViewedDate__c FROM GridView__c];
        system.assertEquals(3, tList.size());
    }
}

But no coverage for "global void execute(Database.BatchableContext BC"
ANy suggestions would be apreciated.
Thank you
P