CommonCoreTawan
  • Member for 8 years, 6 months
  • Last seen this week
Authorize Apex Rest API call using an Azure token
4 votes

In general, for oauth to work, the user needs to authorise salesforce to perform requests on their behalf. If you haven't done it already, I suggest you go through the documentation on the many ...

View answer
Oauth2 redirect_uri_mismatch except that it matches exactly
Accepted answer
3 votes

If your sandbox has My Domain enabled, replace test.salesforce.com with your domain and try again.

View answer
How to determine where an email template is being used?
2 votes

You can use Salesforce Happy Soup, which provides 100% free Salesforce Impact Analysis. Happy Soup will tell you which email alerts are using your template, as well as which apex classes are using ...

View answer
Test pagereference with selection of multiple Ids
Accepted answer
2 votes

Use the setSelected method after you instantiate the controller List<Object> objects = TestHelper.getObjects(50); ApexPages.StandardSetController stdController = new ApexPages....

View answer
Performance issue when deleting Opportunity Line Items
2 votes

You have done good enough research to be able to log a case with Salesforce, especially if the issue is reproducible in a clean org. I used to work for Salesforce Developer Support so I can tell you ...

View answer
Why is this flow invisible?
1 votes

If you use HappySoup.io (free and community-led open source project) to see where a field is used, the results will tell you which flows are real flows vs which ones are process builders. This would'...

View answer
Can I retrieve an Email Alert via the Ant Migration Tool?
1 votes

To retrieve WorkflowAlert with the Metadata API you need to make sure to include the object name before the alert name i.e Case.My_Alert or Account.Hello_World

View answer
Create Account Contact Relationship using AccountContactRelation object in Apex
1 votes

Your query List<AccountContactRelation> acrList = [SELECT AccountId, ContactId FROM AccountContactRelation]; is pulling ALL the records of the AccountContactRelation table, like literally ...

View answer
LWC wire Service empty return
1 votes

I had this issue today, the way to check this is with a getter method on the component get hasDuplicates(){ if(this.dupLeads && this.dupLeads.length){ return true; } return ...

View answer
How to add a very big string as a default value of a custom field?
1 votes

Custom text fields only support 255 characters. You can try using a rich text area or long text area, but you'll have to use Apex to populate the field before the record is created (i.e as a default ...

View answer
How to get the root cause of an unhandled trigger error?
1 votes

That's because you have nested exceptions, so the code is only seeing the higher level one, to be able to see both, both of them need to be explictly thrown/catch, for example On account trigger ...

View answer
Why we are allowed to pass sObject in queueable?
1 votes

Queueable is a completely different framework from future methods, and it gives a lot of benefits over it. It was probably easier and safer for salesforce to create a new framework/interface, than the ...

View answer
How to query parent record,given the child record I'd in Salesforce?
1 votes

You can query the account fields in two ways SELECT borrower__r.Name,borrower__r.Industry FROM Opportunity WHERE Id = 'myid' or and query the object directly filtering by the account id on the ...

View answer
Querying Apex Classes & Dependent Test Classes
1 votes

You might be able to pull some of this through the Tooling API https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apexcodecoverage.htm

View answer
How can I write a test that involves accessing the EmailMessage.ActivityId field?
1 votes

Here's a hack. If you are running a test (as in, the code is called by a test class), then don't filter by activityId EmailMessage emailMessage; if(Test.isRunningTest()){ emailMessage = [SELECT ...

View answer
How to add Google tag management to a Salesforce Sites page?
1 votes

Visualforce pages have implicit html and body tag, so yeah, you can add those blocks at the beginning or end of your page, as specified. Also, nothing stops you from adding your own html and body ...

View answer
SymbolTable not supported
1 votes

You need to query the field from the ApexClass object first, as seen here https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apexclass.htm Also If ...

View answer
Unable to login using Frontdoor.jsp
1 votes

Using the frontdoor.jsp to get a session id is not a supported way of logging in, it might work, but salesforce can change the implementation at any time. What you are trying to do sounds a IDP ...

View answer
WHich fields are changed by Salesforce internally when a lead is converted?
1 votes

The following fields are updated ConvertedAccountId ConvertedContactId ConvertedDate ConvertedOpportunityId Source: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/...

View answer
APEX test script to web server with a static time stamp doget cakk and HttpGet
1 votes

You have a comma between the last field in the SELECT clause and the FROM clause ce, from Lead

View answer
trigger to convert lead automatically creating multiple object records
Accepted answer
1 votes

Database.convertLead is going to create a new contact, unless you modify the LeadConvert object to use an existing contact Id. See here https://developer.salesforce.com/docs/atlas.en-us.apexcode....

View answer
Dynamic VF Binding error
1 votes

Figured it out, the list of field api names must be a list, it cannot be a set, so I changed public Set<String> fieldsToPopulate {get; set;} to public List<String> fieldsToPopulate {...

View answer
Best option to export more than 15 millions records from Salesforce?
1 votes

When you need to extract 10s or 100s of millions of records from Salesforce, you’ll get better performance and reliability if you split the job into a number of separate queries that each retrieve a ...

View answer
Change Data Capture and Async Triggers
1 votes

Using batch or queueable apex allows you to work with a higher set of limits, so if your apex processing is very complex, using batch/queueable is probably a good idea. The new feature to me seems ...

View answer
What is the definition of a Salesforce API call?
1 votes

In terms of limits, an API call is an inbound API call.

View answer
Auto-populate fields w/o Triggers
Accepted answer
1 votes

This sounds like a perfect use case for batch apex You can create a batch class that loops through all your contacts and populates the fields based on the logic you define. To run the batch, you ...

View answer
Assign a Lead To Queue
1 votes

Things to check: is your class actually being called in the before insert trigger? Sounds basic but I've made this mistake a few times. Or maybe the class is called, but the trigger itself is not ...

View answer
@testSetup method and System.CalloutException: You have uncommitted work pending
1 votes

I had a very similar issue but I was able to fix it by adding Test.startTest and stopTest before and after the web service call, as follows: Test.startTest(); Test.setMock(WebServiceMock.class, ...

View answer
Tooling api sObject type 'Layout' is not supported (Permissions)
0 votes

You can retrieve the entire metadata of a page layout using the Metadata namespace (and its classes) natively in apex https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/...

View answer
Find org where connected app was created to update its config params (having only consumerKey and consumerSecret)
0 votes

Log a case with Salesforce. They will be able to tell which app the credentials were generated from.

View answer