The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

1

You need to update your code. HttpRequest req = new HttpRequest(); req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID()); req.setHeader('Content-Type', 'application/json'); req.setEndpoint('https://brave-raccoon-5j3npj-dev-ed.lightning.force.com/services/data/v47.0/tooling/sobjects/'); req.setMethod('GET'); Http h = new Http(); ...


1

Not entirely sure that this would work, but you could try the SSJS RaiseError function, here's an example: <script runat="server"> var StatusAndRequestID = [0,0]; var newObject = Platform.Function.InvokeCreate(CreateRequest,StatusAndRequestID,Options); var status = StatusAndRequestID[0]; var requestID = StatusAndRequestID[1]; if(Result != ...


1

Your in the right way! Here, after getting instance as a Map, just retrieve the needed value: Map<String, Object> deserialized = (Map<String, Object>) JSON.deserializeUntyped(resGetNrw.getBody()); for (Object instance : (List<Object>) deserialized.get('results')) { Map<String, Object> data_i = (Map<String, Object>) ...


Top 50 recent answers are included