• Al Awan Properties
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I developed an integration Lightning Connected app in my product.
However when I try to use trial account (my development one seems ok) I get 403 (rest api not enabled). I realize that this is a limitation of a trial account, hence my question:

In order to distribute my inner integration to my users for free, should I even register to partners program or leverage that users will have REST Api enabled in their Salesforce Organizations?

 
This is my code and i am not getting results 

global class batchclass implements Database.Batchable<sObject>,Database.Stateful{
    global Decimal sum;
     /* Batch class constructor */
    global batchclass(){}
    //Start method
    global Database.QueryLocator start(Database.BatchableContext BC)
    {
        String query='SELECT id, Amount from Opportunity';
         return Database.getQueryLocator(query);
        }

    //Excute method
    
global void execute(Database.BatchableContext BC, List<Opportunity> scope)
{
    //Excution logic
    //List<Opportunity> opp= new List<Opportunities>();
    AggregateResult[] gr=[select id,TotalAmount__c,(select amount from Opportunities) from account where id IN:accountIds];
        system.debug(gr);
    for(AggregateResult ag:gr){
        sum = (Decimal)ag.get('optyamt');
        system.debug(''+sum);
    }
    
}
      global void finish(Database.BatchableContext BC){
            // Finish logic
          system.debug(''+sum); 
       }
}