New answers tagged

0

Save the file as a CSV, then go to the Data Import Wizard, which allows you to map by Account Name.


0

PATCH seems no longer supported. A work around is a POST method with a parameter : _HttpMethod=PATCH So It becomes : https://orga--sandbox.my.salesforce.com/services/data/v47.0/sobjects/Account/{id}?_HttpMethod=PATCH In the Body : { "AdCloud_PartnerID__c":"5400" } Please, upvote is it works for you.


0

Here is a sample of a record update: PATCH /services/data/v47.0/sobjects/Account/001XXXXXXXXXXXX HTTP/1.1 Host: myorg-dev-ed.my.salesforce.com Authorization: Bearer 00DXXXXXXXX Content-Type: application/json { "BillingCity" : "San Francisco" }


2

When you're putting a subquery in your SELECT clause (i.e. you're querying to see which child records are related to the main target of your outer query), you need to use the child relationship name rather than the normal label for the child SObject. In your case, that means you need to use Attachments (the plural of the label) rather than Attachment. From ...


2

The first idea that came to me, is to add a technical field on account (flag, default = false). Extend your CSV with the new flag, set for all = true Update accounts Extract contacts with condition where Account.MyFlag__c = true update contacts Delete flag (since not more useful)


8

I finally found the answer to this after hours of searching. This happens when you have setup a community audience that references the record type you are attempting to deactivate. It seems as though the platform isn't able to route you to the audience as the reference that is invalid, and I couldn't find any documentation on the FieldBasedPAC object, which ...


1

A good pattern to follow when writing a testmethod is the Given-When-Then pattern // Given a mock Account // When Account Updated // Then Verify Contact created then fill in the details // Given a mock Account Account mockAccount = new Account(...); insert mockAccount // When Account Updated Test.startTest(); update mockAccount; Test.stopTest(); // ...


0

Your trigger creates a new contact when Account is updated and if type = 'Prospect' @isTest public class Update_contact_based_on_accTest { public static testmethod void PrimaryAccountTest(){ Account acc = new Account(); acc.Name = 'Test'; acc.Type = 'Prospect'; insert acc; Profile p = [SELECT Id FROM Profile ...


Top 50 recent answers are included