• Ganesh Punde 10
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies
Hi All,
I am not able to insert the SObject from Apex class. It throws System.CalloutException exception.

When I hit the button from UI. I have created the SObect by fetching data from some external Https APIs and when I tried to insert it. The callout exception is thrown. 
I have tried to Add future Annotation for the method as well as tried to add a Queueable job. Unfortunately, it not worked for me.

Could you please help me to solve the issue?
Thanks in Advance.

Queueable class is mentioned below:-

global class QueueableLoggerCallout implements Queueable , Database.AllowsCallouts 
{
    TestLogs__c sl;
    
    public void execute(QueueableContext context) {
        System.debug('QueueableLoggerCallout.execute Start.');
        insert sl;
        System.debug('QueueableLoggerCallout.execute End.');
    }
    
    global QueueableLoggerCallout(TestLogs__c qsl)
    {
        sl = qsl;
    }
}


Class with future method :-

global class Logger
{
    TestLogs__c sl;
    
    @future(callout=true)
    global static void addLog(TestLogs__c qsl)
    {
        insert qsl;
    }
}

I have created a partner portal and created some users to login into that portal.

When we clone the "Gold Partner User" profile and set "API enable" to true under "Administrative Permissions". The user not able to login into the partner portal.

Please help me to enable the API access to this User. 

Hi,
   I am using WSDL to get user information using salesforce session id. I have added below line in VB.net v4.5:- 

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 Or SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls

It's not working for Sandbox environment but it works for a production environment. Could you please help me?