• Paras Polra
  • 5 Points
  • Member since 2018
  • Salesforce Developer
  • salesforce.com

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 2

Step 1: I have used SAP Business one login API and get the sessionId and these session id is used for authentication in another API.
Step 2: I have tested order API using sessionId and it is working fine in postman.
Step 3:
Now I am testing same api with Salesforce anonymous window:

I executed below code using Salesforce anonymous window but it is not working and throwing Read timeout error.

String url = '$filter=DocEntry lt 8 and((DocEntry lt 8 or DocEntry gt 116)and startswith(CardCode,\'C20000\'))';
String B1SESSION = 'B1SESSION=0e9f02f8-d8d2-11eb-8000-0a0e85552c48';
Http http = new Http();
HttpRequest req = new HttpRequest();
req.setHeader('Cookie', B1SESSION);
req.setHeader('Content-Type', 'application/json');
req.setHeader('Accept', '*/*'); 
//Request Send
HTTPResponse res = http.send(req);
Integer responseCode = res.getStatusCode();
System.debug('response Code::'+responseCode);
System.debug('response Body::'+res.getBody());

When I removed query parameter from URL then after it is working fine so I am not getting why it is not working with $filter query parameter?

So it is salesforce bug or salesforce is not supporting complex query parameter like below?

Odata Query Parameter:

$filter=DocEntry lt 8 and((DocEntry lt 8 or DocEntry gt 116)and startswith(CardCode,'C20000'))';

On Trailhead:


Check Challenge button does not complete and returns message:

'Looks like we're having issues, please try again. If this issue persists, please contact us using the submit feedback section on the sidebar.'

Please advise
Challenge Not yet complete... here's what's wrong: 
The 'Accounts' class 'onApplyDefaults' method does not appear to be setting the Description field to 'Domain classes rock!' correctly for a default value.
public override void onApplyDefaults() 
        List<Account> updatedAccounts = new List<Account>();
        for (Account acct : (List<Account>)Records) {
                acct.Description = 'Domain classes rock!';
        fflib_SObjectUnitOfWork uow = new fflib_SObjectUnitOfWork(new Schema.SObjectType[] { Account.SObjectType });

Any recommendations or suggestions would be greatly appreciated.