New answers tagged

0

The following are the System fields present on every object in Salesforce. Not all of them may be explicitly visible on the UI sometimes, but you should always assume that it is somewhere there in the background. See here. Id IsDeleted CreatedById CreatedDate LastModifiedById LastModifiedDate SystemModstamp


0

Managed to get this working but it's not what I would call a "RESTful" solution. The only way to create new DataCategoryGroups and DataCategories is through the Metadata API. The Metadata API operates by uploading zipped file structures of XML. The REST endpoint for metadata is described here: https://developer.salesforce.com/docs/atlas.en-us....


1

You can check the type with instanceOf: Object result = JSON.deserializeUntyped(strResponse); if(result instanceOf Map<String, Object>) { // This is a Map } else if(result instanceOf List<Object>) { // This is a List } This allows you to determine what the type is before you try to cast, avoiding the need for try-catch blocks. Note that the ...


0

You can always try return type Object and convert afterwards. public static Object GetCallout(string namedCredential, string endpoint) { And then: Object test = GetCallout('SF_Enterprise', '/services/data/v48.0/sobjects/Case/describe'); Object test2 = GetCallout('Mule_ESB_Crosswalk_Service', '?guid=9C7E57CF-2DC7-4C89-B476-11166DED34DC'); Map<String, ...


2

Create a new Auth Provider (Setup > Identity > Auth. Providers) for Salesforce, then you can use Named Credentials. Use OAuth, and you won't need to worry about username/passwords, even if the admin changes their username or password; the session will be maintained for you. Only users with Author Apex could possibly write code to even use the Named ...


0

I got the same error and what fixed it was choosing "Send client credentials in body" in the "Client Authentication" dropdown.


0

I contacted support but did not get any reply meanwhile i made (seeallData=true) and it worked


1

RestContext.request.params are for Query String parameters (e.g. /services/apexrest/v1/BikeManagement?Name=Continental+GT+650&Engine_Displacement__c=648.9&...). If you want to use your current design, you must set the Content-Type header to application/x-www-form-urlencoded and change the payload as follows: Name=Continental+GT+650&...


Top 50 recent answers are included