• Oleg Malinovsky
  • NEWBIE
  • 10 Points
  • Member since 2017

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

Hi,

I'm trying to check if a field Account -> Customer Type is empty and if it is not, check if it is 'Managed Services', otherwise do nothing.

When account with somehting in 'Customer Type' opens a case, everything works smooth.
When 'Customer Type' is empty for account that opened a case, I get this error:

Error element myDecision (FlowDecision).
The flow failed to access the value for myVariable_current.Account.Customer_Type__c because it hasn't been set or assigned.

Idea of the first check, Is Null, is to prevent this from happening but this does not help.

How it looks now

Any help is appriciated,

Thanks.

 

Hi everyone,

I have a simple code that should make GET call to my endpoint and yet I could not make it work.

public class aaa {
   
    @InvocableMethod
    public static List<String> makeACall(List<String> url) {
    
        // Execute a call to a Web Service

        HttpRequest req = new HttpRequest();
        req.setEndpoint('www.example.com');
        req.setMethod('GET');
        HttpResponse response = new Http().send(req);
        
        return null;
    }
}

 

This code should be triggered through process builder workflow each time a new Case is opened but I get error:

System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out

Every time I try to open a case.

Help is SUPER appreciated!

Hi,

I'm trying to check if a field Account -> Customer Type is empty and if it is not, check if it is 'Managed Services', otherwise do nothing.

When account with somehting in 'Customer Type' opens a case, everything works smooth.
When 'Customer Type' is empty for account that opened a case, I get this error:

Error element myDecision (FlowDecision).
The flow failed to access the value for myVariable_current.Account.Customer_Type__c because it hasn't been set or assigned.

Idea of the first check, Is Null, is to prevent this from happening but this does not help.

How it looks now

Any help is appriciated,

Thanks.

 

Hi everyone,

I have a simple code that should make GET call to my endpoint and yet I could not make it work.

public class aaa {
   
    @InvocableMethod
    public static List<String> makeACall(List<String> url) {
    
        // Execute a call to a Web Service

        HttpRequest req = new HttpRequest();
        req.setEndpoint('www.example.com');
        req.setMethod('GET');
        HttpResponse response = new Http().send(req);
        
        return null;
    }
}

 

This code should be triggered through process builder workflow each time a new Case is opened but I get error:

System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out

Every time I try to open a case.

Help is SUPER appreciated!