• Md Habibulla
  • NEWBIE
  • 0 Points
  • Member since 2022

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

I created a SOAP Web Service in Salesforce that has multiple callback methods. Each of these methods is prefixed with the keyword "webservice", and they are intended to be accessed by external clients. However, I am currently working on implementing an authentication process to ensure that only authorized clients can access these methods.

Example code:

global with sharing class QBWebServicesV1 {

    // clientVersion Callback
    webservice static String clientVersion(String strVersion) {
        // Return your supported QBWC version
        return '';
    }

}

NOTE: Especially to Integrate QuickBook Desktop via Web Connector.

 

Any assistance, including code examples or references to Salesforce documentation, would be greatly appreciated.
Thank you for your support!

I created a SOAP Web Service in Salesforce that has multiple callback methods. Each of these methods is prefixed with the keyword "webservice", and they are intended to be accessed by external clients. However, I am currently working on implementing an authentication process to ensure that only authorized clients can access these methods.

Example code:

global with sharing class QBWebServicesV1 {

    // clientVersion Callback
    webservice static String clientVersion(String strVersion) {
        // Return your supported QBWC version
        return '';
    }

}

NOTE: Especially to Integrate QuickBook Desktop via Web Connector.

 

Any assistance, including code examples or references to Salesforce documentation, would be greatly appreciated.
Thank you for your support!

Hi,

  I want to schedule belows class to run every 1hour I tried using the scheduler to run every day at a specific time but this is not working please suggest me how to make this work. 
 
list<String> toAddresses = new List<String>();
 list<Messaging.SingleEmailMessage> mailsToSend = new List<Messaging.SingleEmailMessage>();
 list<opportunity> opp = new list<opportunity>();
 String htmlBody; 

 opp = [select id,name,account.name,owner.name,owner.email, 
               Stage_Prior_Value__c,StageName,Close_Date_Prior_Value__c,
               closedate,f_ACV__c 
         from Opportunity 
         where Stage_Prior_Value__c = '2 - Contracts' or Stage_Prior_Value__c = '3rd Notice - Contracts' ];

for(Opportunity Op: Opp){
 htmlbody = '<html><body>';             
 htmlbody += '<p><strong> Owner Name : ' + op.owner.name + '</strong><br/></p>';
 htmlbody += '<p><strong> Account Name : ' + op.Account.name + '</strong><br/></p>';    
 htmlbody += '<p><strong> ACV Amount : ' + op.f_ACV__c + '</strong><br/></p>';    
 htmlbody += '<p><strong> Prior Forecast Category : ' + op.Stage_Prior_Value__c + '</strong><br/></p>';    
 htmlbody += '<p><strong> New Forecast Category : ' + op.stagename + '</strong><br/></p>';       
 htmlbody += '</body> </html>';   
          
      toAddresses.add('sudhir.narayanaswamy@gmail.com')    
      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
      mail.setToAddresses(toAddresses);      
      mail.setSenderDisplayName('Deals moving out of Commit forecast ');
      mail.setSubject('Deals moving out of Commit forecast ');
      mail.setUseSignature(false);            
      mail.setHtmlBody(htmlBody);
      mailsToSend.add(mail);
      Messaging.sendEmail(mailsToSend);    
    
}

Thanks
Sudhir