Hot answers tagged

11

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 -N). That misplaces whitespace is probably the reason why that line is not getting covered Edit: Try to use constants for this kind of things. It will make ...


9

This seems to be possible. I just performed this simple test as a user without that permission without any problems, so if I understand the question correctly I think the answer is yes. Page: <apex:page controller="TestQueueMembership"> <apex:messages /> <apex:form > <apex:commandButton value="Test" action="{!toggle}"/...


8

Depending on how many leads you are getting daily, you may be able to plead your case to your rep and get the value increased. Shell Black has verified this is possible. If it is consistently much higher, you would be better off creating a custom solution to generate your leads via the API.


8

Leads have specific uses: queues, lead assignment rules, auto response rules, web-to-lead, "unread by owner" field, campaign integration, and reporting. Let's go over each feature in more detail, shall we? Queues Queues let groups of people pick from a common pool of leads they want to follow up on. Very few organizations use this feature as it is, I ...


8

Great observations. I've encountered these are two variations: someone who logs into the AppExchange and clicks Get It Now will have: lead source SFDC IN|PackageName appropriate campaign membership a Trial license created someone who holds the package install link (eg by copying it out of the URL) will get: lead source Package Install no campaign ...


6

Figured this one out myself - hopefully this answer helps someone else. In the lead settings, there is a setting to Override the existing record type with the assignee's default record type. Updating this to keep the existing record type solved the issue for me. See screen below:


6

Steve, I'm guessing the problem is that you don't have any Zip_Code__c objects defined in the test environment! Remember, tests run with no standard SObjects, they don't have access to your data. You need to manually create any objects you're going to use. How does the following work for you? @isTest private class AssignLeadOnCreate{ static testMethod ...


6

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 class TestNoteOnInsert { @isTest static void test() { Lead testLead = new Lead(); testLead.FirstName = 'Test first'; testLead.LastName ...


5

You can make the field not required by requesting Person Accounts be enabled in your organization. Failing that, there would necessarily be a before insert trigger in play. It may be in a managed package installed, in which case you may not be able to determine the origin of the update.


5

I've recently tested for all the cases dealing with Leads coming from the AppExchange (SFDC-XX) and Leads coming from an actual Package installation. As expected, it's pretty confusing at times. Here's a flowchart that explains everything, depending on whether an individual chooses to install your app on a Production/Dev org or a Sandbox.


5

I think you're confusing some methods, to get lead fields you can use the get method. sObject l = [select id,name from lead limit 1]; system.debug('this is it' + l.get('name')); Have to admit that I find the getSObject(s) documentation somewhat vague and couldn't produce a working example in a short time. Maybe someone else can. Edit GetSObject is to ...


5

If you have it the SOQL Polymorphism and Type OF feature enabled in your org, then you could use TYPEOF in your SQOL to try to get this info. Something like below SELECT TYPEOF Who WHEN Contact THEN Phone WHEN Lead THEN LeadSource ELSE Name END FROM Task If it is not enabled, then I think you are forced to use a second query as related ...


5

The two most highly rated free de-duping Apps on the App Exchange are Dupe Catcher and Duplicate Check. Some of the features in the latter are available only in the paid version while everything in Dupe Catcher is completely free. As part of full disclosure, I'm not financially associated with either company but have met some of the employees of Symphonic ...


5

There are two ways: The entire object According to the documentation business processes are deployed as part of the custom object metadata file (.object), so you get it if you include the object in the package xml The package.xml: <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types&...


5

The Partner API SOAP method convertLead() is at its core an HTTP POST request where the Body is XML that conforms to to the WSDL. There is nothing stopping you from building up that XML string and posting it to the required URL (including the required SessionId). If you need you can even parse the XML response. I don't want to get into the differences ...


5

You set the individual fields, such as BillingStreet, BillingCity, BillingState, BillingPostalCode, and BillingCountry (plus the geolocation codes, as well, if you prefer). The address complex field is a convenience field derived from the parts, just as a contact or lead's "Name" field is really a concatenation of the various parts of their name (first, last,...


5

According to this documentation, they will move: Any related items from any of the duplicate accounts will be associated with the newly merged account.


5

Found it - at least the closest I could find: If you're using a custom field in Salesforce on both leads and contacts, we pull the name of the Salesforce field from the contact field ID. ... We recommend that each Salesforce custom field you map has its own unique API name as Pardot will not respect case sensitivity when syncing. For example if you have two ...


5

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 names taken from the schema. The friendly name as shown to the user is confusingly only tangentially related to the real relationship name.


5

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 stages that allow conversion Create two page layouts (use page layout assignment) one for the first record type,. Remove the Convert button on the page ...


5

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 'merge' when my org implemented the feature to allow Contacts to be related to more than one Account, we used Microsoft Excel to handle the bulk of the work. The ...


5

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 Workflow INFO and Apex Code DEBUG Or, you may have workflow rules or Process Builder rules that do updates on the Lead. The object will have changed and per SFDC ...


5

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 which will initially be populated as created date + 7 days. If any action has taken on the lead then mark this Action DateTime as blank. Your time based action ...


5

The documentation on Lead seems pretty clear: Name Description Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.


4

Make a small site from site.com in your own salesforce. Go to setup->app setup->develop->sites You will get a URL from here that will go into the facebook app that you create. The app will diret the person to this site(much like it happens in IBIBO etc) and his/her information is sent to that site. The site's visualForcePage captures this information and ...


4

Where does your CSV come from? Probably easiest is to export a report out of Salesforce (including the Id column), apply changes there (in Excel?) and import back the updates by Id. If you have any unique field on the Leads (something that identifies them in external system? Email? anything?) you could mark that field as external Id and then either update ...


4

As for apps that you can use to collect the leads, I'm a fan of Form Assembly. Easy to setup, maintain and does some snazzy lookup logic so you can avoid dupes.


4

I took the Account example from your first link, and changed each Account reference to lead. EDIT: From the doc page you link above, "This page does not specify a filter in the request, so the page is displayed with the last used filter." In my testing, my last used Lead filter happened to be "All Open Leads". If your last used filter shows no leads (e.g.,...


4

Set up default values for your fields. This is detailed in the documentation here and here. Default field settings are available on one of the screens that appears when you are creating a field, to add them for existing fields use the Edit link next to the field name on the object's field settings screen. Use default field values to make your users more ...


4

I think you might be out of luck. Apparently only the user's default record type will be used: Record types: If the organization uses record types, the default record type of the new owner is assigned to records created during lead conversion. The default record type of the user converting the lead determines the lead source values available during ...


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