Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
12 votes
Accepted

Trigger not updating field in Test Class

The error is in your Status. In the trigger you've got: if (l.Status =='Open- Not Contacted') (note the n- N), and in your test class you create it as: ld.Status='Open -Not Contacted'; (note the n ...
Novarg's user avatar
  • 5,264
6 votes
Accepted

'Unexpected syntax: 'mismatch input 'insert' expecting RCURLY' on apex test class for trigger

You can't put "executable" code outside of a method. Also, to actually have a unit test, you need a method marked with @isTest or testMethod. You also have a few other minor issues. @isTest public ...
sfdcfox's user avatar
  • 494k
5 votes
Accepted

Visualforce customization isn't displaying multiple fields

The reason for this issue is that the relatedList is not named "Campaign Histories" Use: <apex:relatedList list="CampaignMembers"/> apex:relatedList list= values have to be valid relationship ...
cropredy's user avatar
  • 71.7k
5 votes
Accepted

Why is LastModifiedDate not listed as a standard field in the UI?

Its a system generated date that is not listed in the standard field list. You will also notice that Created Date is not listed there. These field still exist. You can confirm by doing a simple ...
Chris Duncombe's user avatar
5 votes

Is there a way to hide/disable standard Salesforce button clicked

To hide the button This can be done with record types and page layouts Create two record types - one for Leads with stages up to but not including the stage that allows conversion one for Leads in ...
cropredy's user avatar
  • 71.7k
5 votes
Accepted

Avoiding creating duplicate Contacts in Marketing Cloud when using Sales Cloud records

Generally speaking, we create Automations that do a Query/Extract/Import to All Subscribers for any email address that's associated with an unsubscribed Subscriber Key. This obviously doesn't prevent ...
Adam Spriggs's user avatar
  • 30.7k
5 votes

Can anyone suggest a good Mass Duplicate Leads Merge Free tool?

This is probably one of those situations where you have a tradeoff between cost and time. When I (well, me and my intern) needed to sort through roughly 30,000 Contact records to 'deduplicate' and '...
Derek F's user avatar
  • 62k
5 votes

Lead before update runs on insert

A typical reason for this is that you have Lead Assignment rules. Once those execute, a new owner is assigned and hence the Lead object is updated. You can see this in the debug log if you enable ...
cropredy's user avatar
  • 71.7k
5 votes
Accepted

Prevention of Lead conversion as it has a time based action queued

I think, you are creating time based action based on created date and this time based action is getting queued. I would suggest you to create a separate datetime field, let's say Action DateTime ...
Santanu Boral's user avatar
5 votes

Is Lead.Name 100% predictable?

The documentation on Lead seems pretty clear: Name Description Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.
Adrian Larson's user avatar
  • 150k
5 votes
Accepted

Query Task.Who.Owner.Email in SOQL

WhoId and WhatId on the Task SObject are polymorphic relationship fields. They can hold an Id (just one Id) from a variety of different SObjects, so the standard way of querying/accessing parent data ...
Derek F's user avatar
  • 62k
4 votes
Accepted

How can I get the Campaign IDs of Leads through triggers?

[SELECT Id, CampaignId, LeadId FROM CampaignMember WHERE LeadId IN :leadsInTrigger ] Using this query you get all campaign member for the leads that are in your trigger scope. From that you should be ...
Nielsm's user avatar
  • 2,084
4 votes
Accepted

How to convert a LEAD to Person-Account directly (without any API or code)?

From this answer at Salesforce Developer Forums, it appears that when Person Accounts are enabled in your Org you can make the Company on Lead optional and remove it from the page layout. Do you ...
Dave Humm's user avatar
  • 5,111
4 votes

Trigger not updating field in Test Class

Among the other answers here you will still need to move this line to be after you insert your task. Lead Getleadupdated = [SELECT Status FROM Lead where ID = : createlead.id]; Otherwise the value ...
dBeltowski's user avatar
  • 3,038
4 votes
Accepted

How can I modify the layout of the Leads Home Page?

Shortest answer: you can't do this with customization. Shorter answer: It has been rumored that this might be something you can customize in Lightning (in a future release), but there's no way to do ...
sfdcfox's user avatar
  • 494k
4 votes
Accepted

Trigger Process Builder when user receives lead, not queue

In your Process Builder criteria diamond check the Lead OwnerId starts with 005 This will tell you whenever a Lead is assigned to a User instead of a Queue
dBeltowski's user avatar
  • 3,038
4 votes

Query Only Duplicated Records

You must have got a success file stored on your local machine after insertion of records. Take the last files from the two record insertion files and take the id's from them. Delete those id's via the ...
Ruchi's user avatar
  • 1,515
4 votes

Query Only Duplicated Records

I would recommend in an urgent scenario like this (and assuming you have the "power" to be so decisive) using the Developer Console to run some Anonymous Apex to draw out a list and delete the ...
Simon Lawrence's user avatar
4 votes
Accepted

How to add a map widget to a Lead object?

Supporting @Adrian's comment, I am providing my answer. Rather than using "Google Maps API" (which is not fully FREE), I have used <apex:map> component which is in-build in Salesforce and takes ...
Santanu Boral's user avatar
4 votes

Assign leads from few queues as per round robin rule

You can look for the options to use Omni-Channel for lead assignment. Use Omni-Channel to create work items from Salesforce records and route them to the most qualified, available agents in your ...
Santanu Boral's user avatar
4 votes
Accepted

Automation on lead merge

Using the after delete trigger via MasterRecordId is documented to be the only way to trigger on a merge: If your application requires special handling for deleted records that occur as a result of ...
David Reed's user avatar
  • 93.1k
4 votes
Accepted

Create already converted lead

Did you try by enabling "Set Audit Fields upon Record Creation" permission? Here is how to: https://help.salesforce.com/articleView?id=Enabling-Create-Audit-Fields-for-Professional-Edition&type=1&...
Nielsm's user avatar
  • 2,084
4 votes

Create already converted lead

There are indeed a way to import converted Lead(which is a type of creating converted lead.) Fields we need for importing converted leads are “ISCONVERTED” , “CONVERTEDCONTACTID” , “...
Tushar Sharma's user avatar
4 votes
Accepted

Post to chatter with hyperlink in Process Builder

You cannot mention Lead, you can only mention Users or chatter group. Hyper-Link Dont work in Chatter Mesages via process builder. You can handle this in a different way, You can change your process ...
Pranay Jaiswal's user avatar
4 votes
Accepted

Is it possible to access the email of a Lead's owner directly?

You don't need soql to do that, you can directly use setTargetObjectId setTargetObjectId(targetObjectId) optional . The ID of the contact, lead, or user to which the email will be sent. The ...
Pranay Jaiswal's user avatar
4 votes

lead import from facebook using webhooks

Speaking just to the Security Review test credentials issue - you have to provide all credentials the security review team will need to test your app end-to-end. This usually minimally includes the ...
Brian Miller's user avatar
  • 5,222
4 votes
Accepted

Dates appearing one day before the actual date

The problem is due to ui:outputDate. I think its showing date in UTC. Also, it is deprecated as of API version 47.0. Consider using lightning:formattedDateTime instead of ui:outputDate. With lightning:...
Rahul Gawale's user avatar
  • 12.2k
4 votes
Accepted

Trigger with count SOQL

Depending on where you get/see/view the error, Salesforce can have a hard time displaying the entire message (because < and > are what xml/html use, and rendering html based on user input all ...
Derek F's user avatar
  • 62k
3 votes

Visualforce customization isn't displaying multiple fields

You have to use related list's reference names, not the titles. Here is 2 examples: <apex:page standardController="Lead"> <apex:relatedList list="OpenActivities" /> <apex:...
o-lexi's user avatar
  • 3,094
3 votes
Accepted

REST API - Check if Lead or Contact given ID

Thanks for @kurunve above I will add the answer also: When a Lead gets converted the Lead Record will still remain and can still be accessed by the same ID as before. You can simply check the Lead ...
Dieskim's user avatar
  • 141

Only top scored, non community-wiki answers of a minimum length are eligible