7
votes
Getting a formula validation error, can anybody spot where I am off?
Your last IF block has no value_if_false.
What you have
IF (
ts2__Job__c.Days_Search_Open__c >= 91,
"91+",
)
What you need
IF (
ts2__Job__c.Days_Search_Open__c >= 91,
&...
5
votes
Accepted
Error List index out of bounds: 0, what'is problem please
Your issue is with the way you've written your code.
cpfcontact = new List<String>();
Integer j;
j=0;
for(OpportunityContactRole i: avalista){
cpfcontact[j]=formatacpf(avalista[j].contact....
4
votes
Is it possible to know WHY SOQL retrieves EMPTY?
If the apex class is running in with sharing context then the record level access will kick in the SOQL queries, where it will check if record is shared to the running user or not.
Record Access gets ...
3
votes
Accepted
CPU Timeout Error When Inserting 2000 Records through Apex
You can try to optimize your code by minimizing the number of size() methods you have to call, as well as minimizing heap usage by not dynamically extending your lists. Also, upsert is less efficient ...
3
votes
Accepted
Validation Rule Error: Missing ')'
The issue, is that second parameter of ISPICKVAL function should be a String, not Boolean, which is in your case.
AND(
OR(
ISPICKVAL(Scenario__c, "In-Progress"),
...
3
votes
Unexpected Public Token and variable does not exist
You've tried to define a method (sumMaps) inside of another method (getPricesAndReferences), which is not valid syntax. Your use of static here is also problematic (unlikely to do what you think it ...
3
votes
Accepted
No apex action available for class.method error
I have found when having this issue that causing the class to recompile will fix it. So just save the file again to force that to happen.
2
votes
Accepted
Unable to deploy community: no Network named MySItes
deploying community in to scratch org is not straight way like other salesforce apps.
here are the steps i used in my script:
-- Create Scratch org/ orgshape is best suite if you have since it pulls ...
2
votes
I am facing an error at "Line: 12, Column: 1 System.TypeException: Invalid integer" Could you please help?
String.substring returns the string between startIndex (inclusive) and endIndex (exclusive). Since you specify 1 as the second parameter, this effectively returns an empty string:
System.debug('hello'....
2
votes
Accepted
SFDX commands not working in VS Code
This is an issue that's been reported. For now, potential solutions include downgrading to an older version or using the Node version (npm install sfdx-cli). Either way, try uninstalling and ...
2
votes
Accepted
Runtime error in Marketing Cloud Automation
Script activities do have timeouts.
Large data volume, especially stuff like refreshing data extensions, is generally something that you want to process with SQL, not ssjs.
The problem is in the ...
2
votes
Accepted
Why creation of Apex Trigger on Change Event for Custom Setting fails if it is available in the picklist?
I have opened a case in Salesforce Support and confirmed this is a problem
CDC events should not be supported for Custom Settings and shouldn't appear in the picklist.
They have published a known ...
2
votes
Flow formula expression is invalid: Syntax error. Found ')'
Formulas quickly become a sea of parenthesis. It really helps to indent formulas like you would with code, especially when it comes to issues of mismatched parenthesis.
So instead of
IF ( {!...
2
votes
Trying to fetch Name of profile Using Map
I'm not 100% sure what you are trying to do, but try this:
Profile p = [SELECT Id, Name FROM Profile WHERE Id = :UserInfo.getProfileId() LIMIT 1];
Boolean isSysAdmin = (p.Name == 'System Administrator'...
2
votes
Trying to fetch Name of profile Using Map
Welcome to Salesforce Stack Exchange (SFSE)!
Caspar answered the question that needed to be answered, but to answer the question you asked - about not getting inside your if block:
Mlist is a map
...
1
vote
Accepted
SOAP XSL Integration error during upsert: "cannot specify Id"
When you're using an External ID field, you are not allowed to specify <Id> as well. You need to remove the <Id> from the upsert() call to make it work.
1
vote
CPU Timeout Error When Inserting 2000 Records through Apex
Building on sfdcfox's answer...
The try/catch statements that you have right now should be removed. They shouldn't be using any significant CPU time, but swallowing exceptions is bad practice (as is ...
1
vote
Rest API code 400 "message":"Callout loop not allowed"
I solved the problem. It was caused by a before insert trigger . Thanks all !
1
vote
The apex trigger function .addError() on AfterUpdate is not working for my code
AddError in a trigger context only works when applied directly onto the records in the trigger.
So you need to add the error to Trigger.new or Trigger.newMap (unless you're in a delete trigger, in ...
1
vote
Accepted
Internal Error happens when try to insert 5000 or 10000 in one transaction 1294474088-313147 (-1775489667)
I have opened a Salesforce support case and Support responded this is a known issue, however, it refers a completely different case.
Also, reducing amount of user helps to workaround this issue.
Also, ...
1
vote
preview files not work NavigationMixin
You have to actually pass the content document id( 15 digit or 18 digit ) as selectedRecordId not 'ContentDocumentId' as a string.
1
vote
Accepted
Facing error in trigger on Account Object
I hope you are just copy pasting both one trigger into another which is causing the issue.
Ideally you may need to merge the different trigger context as below.
trigger RecordDeletion on Account (...
1
vote
Cannot retrive picklist values in LWC ERROR: Error during LWC component connect phase: [Cannot read properties of undefined (reading 'values')]
As wire are asynchronous, I think LWC tries to render your template before the wire result is returned.
This means that at first reasonValues may not yet be populated. Try to add a rendering condition ...
1
vote
Cannot retrive picklist values in LWC ERROR: Error during LWC component connect phase: [Cannot read properties of undefined (reading 'values')]
your template is rendered before the wire could retrieve the picklist values, thus reasonValues.data is undefined and trying to render reasonValues.data.values gives an error. You can prevent this by ...
1
vote
Accepted
Handling Exceptions From Different Parts of the Code
If any exception is thrown by the area of code that implements any bullet point in the list, I need to return a 'ERROR' response
You'll want a try-catch inside the loop:
for(AXARequest request:...
1
vote
Accepted
HTTP error code 420 at standard sales cloud pages
This was from one of the many global edge network outages this year. Salesforce didn't notify anyone of the outage until hours after it started. https://status.salesforce.com/generalmessages/786
...
1
vote
Re-sending an errored out triggered email
My suggestion would be to run the not sent tracking extract for the job where the subscribers went to error.
Run the Not sent extract
import the CSV into a DE
Write a Query to join your new DE and ...
1
vote
List has no rows for assignment to SObject: ERROR APEX
This error msg means that query did not return any results, and you are trying to assign this to SObject. It could be either this line
Profile p = [select id from Profile where Name = 'System ...
1
vote
Navigation Link Set: Too many retries of batch save in the presence of Apex triggers with failures: when triggers are present partial save requires
Any idea why it's happening?
You have cascading errors. The system tries to save three times (original request plus two retries). If any components fail in the first batch, another pass is attempted ...
1
vote
Display error in toast from imperative call
Try the below to see if this helps
const event = new ShowToastEvent({
title: 'Save status',
message: error.body.message,
variant: 'error'
});...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
error × 865apex × 271
trigger × 92
visualforce × 72
error-messages × 50
soql × 49
deployment × 42
unit-test × 41
marketing-cloud × 39
lightning-web-components × 36
lightning-aura-components × 35
batch × 29
salesforcedx × 28
lightning × 26
exception × 26
javascript × 24
query × 22
visual-workflow × 21
email × 19
community × 16
formula × 16
class × 15
api × 14
process-builder × 14
list × 14