New answers tagged

2

I have found a better way to accomplish this all in a single call by utilizing REST API. You use the endpoint automation/v1/automations to create (POST) your new automation. See below example: POST /automation/v1/automations Host: {{yourSubDomain}}.rest.marketingcloudapis.com Authorization: Bearer XXXXXXX Content-Type: application/json and then the ...


0

For anyone who comes across this in mid 2019. I found the query selected here as best answer not working for me. What worked for me is using the following query from the Developer Console and clicking on the Tooling API checkbox: select QualifiedApiName, DurableId from FieldDefinition where EntityDefinition.QualifiedApiName = 'Account' That should give you ...


0

You can build a Landing Page of type code resource (subtype JSON), implement an authentication mechanism and execute the claimRow function using plain AMPScript there + return a Success or error message to the caller as JSON. Building such a service has been detailed here: http://www.devsutd.com/writing-a-rest-service-using-cloud-pages All you need to do ...


0

The simplest way is to use an app exchange package like Formatica (I think that's the name) and have it create your form which is then brought in using Web to Lead. In general, the easiest way to do this is using Web To Lead and process the form using routing rules accordingly.


2

I acutally just wrote an article on this in my brand spanking new blog. Below are the highlights from it as well as a sample taken from my original SFSE post on it. Here are the available Methods: GET DELETE HEAD OPTIONS PATCH POST PUT Here is a working sample (taken from here) <script runat=server> Platform.Load("core", "1.1.1"); var accessToken ...


0

Yes, it is possible to be done through apex class with help of MetadataService (https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/MetadataService.cls). Here is the code example: MetadataService.MetadataPort service = new MetadataService.MetadataPort(); service.SessionHeader = new MetadataService.SessionHeader_element(); ...


1

You can retrieve the AddressSettings to get the values and migrate them. In SFDX: sfdx force:source:retrieve -m Settings:Address And in the metadata API: <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <version>46.0</version> <types> <members>Address</...


0

To avoid being DenverCoder9, I've come back to provide the answer. It took an embarrassing amount of time to discover that DemandConnectForm needed to be DemandConnect.Form. A very small and easy to miss typo that returns a completely irrelevant error message.


2

Root cause: you need to explicitly set the Content-Type: headers = { 'Content-Type': 'application/x-www-form-urlencoded' } r = requests.post("https://login.salesforce.com/services/oauth2/token", data=payload,headers=headers) While having your actual assertion did help me help you, you shouldn't do that in the future. Please rotate the ...


0

Content-Type needs to be multipart/form-data; there are also other requirements (see docs). This is difficult to do in Apex but possible. You should vote up this idea.


3

This is covered in the 'Marketing Cloud API Permission Changes' trailblazer group. The Data Extension read permission just grants access to the container, relationships, filters and shared DE folders. It has no impact on viewing or manipulating the actual data within a DE. The Data Extension write permission is what grants access to the data. We have ...


0

Knowledge User License are required if you want to do CRUD on Knowledge object. You need licences. Even with the API, you can't do anything without licence. The only thing you can do is to expose articles to people just for reading articles (ex: Community or Knowledge Widget on Service Cloud). Sorry for you and your client, but if they don't want to pay ...


0

Ideally querying (pk) index field should not this much of time. To idenfity the where slowness is you do following things. On high level slowness can be at 3 level A. Client side - as you are using curl, there is very low chance this can be valid reason. B. Network - its possible. check how is your network speed when you are running these test C. Server - ...


1

The method still works. For SMS, you don't use the RedirectTo() - That's just for tracked links in emails. Simply output the shortened URL: %%[ var @shortenUrl, @bitlyUrl, @link set @link = URLEncode('https://www.example.com') set @bitlyUrl = 'https://api-ssl.bitly.com/v3/shorten?access_token=replaced&longUrl=' set @shortenUrl = HTTPGet(Concat(@...


5

Field History Tracking is the most obvious choice, but comes with significant caveats: Several field types that can't be tracked: formula, roll-up summary, auto-number, created by, last mod by, AI Prediction, and field values longer than 255 chars. "If a trigger causes a change on an object the current user doesn’t have permission to edit, that change is ...


1

Maybe this Summer'19 improvement can help you : we can make an async trigger with Change Data Capture https://developer.salesforce.com/blogs/2019/06/get-buildspiration-with-asynchronous-apex-triggers-in-summer-19.html For a solution without code, you can subscribe to the change events with a flow, and then call your web service https://developer.salesforce....


4

As a workaround to this problem, write yourselves a utility Apex class pinned at version 45 and with a BIG comment saying don't increase the version, and use this utility class method to access this functionality where you need to in your code base.


0

File upload is not officially supported by the Live Agent REST API. This is currently a limitation acknowledged by Salesforce support as of 3rd July 2019. You can still make it work, however it carries the risk of using an undocumented functionality. The request to the upload servlet should be modeled based on the following CURL command: curl "https://cs6....


1

Here is what you need to do for (Object value: values) { system.debug(((Map<String,Object>)o).get('CuID')); } That is, value is a map of <String,Object> so you need to cast that to a new map and then fetch the map entry by key (CuID). Map keys are case sensitive


0

You can build the URN in JavaScript and before use it in HTML. But if you want to do a redirection or navigate to some site you can use NavigationMixin


3

Could you have a small utility class left as API45 and call it from your other classes?


2

As I can see from your code <lightning:input aura:id="channel" label="channel" name="channel" type="text" value="/event/TestEvent__e"/> You are subscribing to the wrong event. CDC Events are streamed on /data/<Custom_Object_Name>__ChangeEvent Thus in Your case as you are upserting CustomTask__c you code will be <lightning:input aura:id="...


0

You can go through different pages by supplying a different page number in the page.page property. If the page number exceeds the actual number of pages, you'll receive an empty items array. For page 1 with a maximum of 50 items: { "query": { "property": "assetType.name", "simpleOperator": "equal", "value": "Template", }, ...


4

for this you need to include a GET method to fetch the ID of the record created and ref that in your following POST method. Below is the payload i modified, try this. I'm positive it will work. Side note: If you only have to create records and there isn't a need to do any kind of updates, you probably want to look at Composite TREE API which is a much ...


2

These are the "describe" calls. There's two basic calls. Describe Global /services/data/v45.0/sobjects/ Lists all types of objects you have access to, and various properties (such as user permissions and certain REST URLs). Describe sObject /services/data/v45.0/sobjects/[ObjectName]/describe Describes fields, record types, related children, and other ...


4

These backslashes are usually a sign of unintended double application of JSON serialization: @IsTest private class JsonTest { @IsTest static void test() { Map<String, Object> m = new Map<String, Object>{ 'a' => 'xxx', 'b' => 'yyy' }; // Normal JSON object with two properties. ...


0

I used the following against the Apex classes generated by v3.12.19175.1 of the FuseIT SFDC Explorer. The Update web method was generated to support both the direct SOAP call and the HTTP version. Note that the direct SOAP version that uses WebServiceCallout.invoke fails with a GACK: System.UnexpectedException: Got an unexpected error in callout : ...


0

I have not worked with the Composite API, but it appears to create records as per the rest of the REST API, so you should be able to create the person account by setting your account RecordType to a Person Account Record Type, and supplying any of the Person Account fields as needed (FirstName, LastName, etc). From there you should be able to use the ...


2

... when I try to deserialize the json receive, nothing is happening. The first callout method is for another api. THe problem comes from the 2nd one From those two statements I assume the problem is occurring in deserializeQuestions2(). Looking at the body of that method the most likely reason that it would do nothing would be responseBody being ...


0

I'm almost positive that you're being affect by a recent SFMC security upgrade. What is going on: SFMC had recently discovered that some REST routes were not following the least access principle in regards to usage, meaning some users could occasionally do more using a route that their access would specifically have allowed. Here is how to find out what ...


3

In Apex, it's not a trivial thing to read .doc files. I use javascript libraries to do it. Here is one of the tools that I use: https://docxtemplater.readthedocs.io/en/latest/installation.html#browser It does an ok job.


Top 50 recent answers are included