Most Popular

1500 questions
13
votes
3 answers

Trigger Old Context Variables (oldMap, old)

According to the documentation, Trigger.old and Trigger.oldMap are only available in update and delete Triggers. Are these variables null otherwise, or are they just empty? Would Trigger.old.isEmpty() return true if it's referenced in an insert…
Matt K
  • 3,400
  • 2
  • 24
  • 54
13
votes
2 answers

Is it possible to get the Standard Field "Name" increased form 80 characters lenght to a greater legth by Salesforce Support?

Is it possible to get the Standard Field "Name" increased form 80 characters lenght to a greater length by Salesforce Support via a case? I know, it's not possible changing this as an Admin. But I never tried to open a case and ask Salesforce for…
Uwe Heim
  • 28,350
  • 18
  • 115
  • 283
13
votes
4 answers

Is it worth it to try for 100% org coverage?

I saw an older post where someone had asked is it possible to get 100% code coverage, the responses were that it's real easy to get around 80% and then to cover the other 20% you're starting to get into edge cases and sometimes methods just cannot…
Dan Wooding
  • 3,518
  • 7
  • 39
  • 84
13
votes
1 answer

Reset an Aura attribute to a blank sObject type?

I have an Aura attribute as follows:
Shobhit Saxena
  • 1,099
  • 4
  • 22
  • 55
13
votes
1 answer

Populating lookup fields using an external ID

I have an lookup field in my opportunity object which is pointing to a custom object called Code__c. Code__c has an external Id field called Code_Source__c. When creating an opportunity once way of linking the opportunity to Code__c is by passing…
Yash Mehta
  • 1,515
  • 4
  • 24
  • 42
13
votes
1 answer

State & Country picklists - importing leads with states for countries without states enabled

Tell me that I'm wrong but it would appear the State and Country picklist feature makes it impossible to integrate / import Leads with state values from countries where you are indifferent to the data quality of the state value. Thus, losing…
cropredy
  • 71,240
  • 8
  • 120
  • 270
13
votes
2 answers

OAuth interactions: do they count as API calls?

OAuth token grants and token authorizations are human interactions that take place in the browser. And token refreshes happen to be machine interactions. Do any of the typical OAuth interactions count towards the 24-hour API limit? I know the…
Matt and Neil
  • 32,894
  • 7
  • 105
  • 186
13
votes
2 answers

How to call child component controller function/helper from Parent Component Controller

I have requirement to call a child controller function from parent controller whenever the event occurs in parent side. for e.g ABC is parent component and DCE is child component, this child component has Span of Text tag and X symbol. when I click…
Raj_SFDC
  • 682
  • 3
  • 15
  • 25
13
votes
2 answers

How to write a generic list method that will cast at runtime?

I recently tripped across the need to take a list of objects (instances of a class--not sobjects) and split them into smaller lists of 200 members each. The unit test below shows the code inside a unit test. It passes, but it's not really what I…
tggagne
  • 466
  • 1
  • 3
  • 11
13
votes
3 answers

OOP best practices - use object fields dynamically

Let's say I am working with bicycles and I need to group them by different criterias. class Bicycle { String brand { get; set; } Date purchaseDate { get; set; } } class GroupedBicycles { String groupingCriteria { get; set; } /* …
Vladyslav K
  • 2,743
  • 7
  • 33
  • 70
13
votes
2 answers

What governor limits impact Apex Describe methods?

Are there any governor limits, or considerations that I should be aware of when using Apex Describe methods? So for example, the author of this blog post uses the structure below to get the record type instead of doing a soql query.…
PartOfTheOhana
  • 10,550
  • 13
  • 92
  • 179
13
votes
3 answers

Dynamic Component Creation using "force:inputField"

@SkipSauls wrote an amazing article on how to use FieldSets in Lightning Components. Thank you! Link here But it seems like, using this approach, we can only use OOTB aura components (ui:textbox, ui:button) . But these components are not compatible…
Jag
  • 1,205
  • 1
  • 8
  • 18
13
votes
1 answer

Why can an Apex Rest service not be annodated as @ReadOnly?

In apex you can create your own REST services quite simply: @RestResource(urlMapping='/DUMMY/v1/*') global class REST_Service { @HttpGet global static string getDummytMessage(){ return 'DUMMY DATA'; } } Salesforce does not allow…
Samuel De Rycke
  • 9,550
  • 8
  • 45
  • 73
13
votes
1 answer

Get all Parent and child objects related to the current object

I have a string which contain the name of a sobject. Now I want to get all the objects related to this object. Also want to get which kind of relationship it have with these object.
Anu
  • 3,847
  • 16
  • 76
  • 131
13
votes
3 answers

Hide the whole empty row of table in VF page when rendered as pdf

I am showing object fields by using , and
tags in page to show the details in some format. I am using following condition to show data on the page, if field is not blank
Rahul Nagardalekar
  • 587
  • 1
  • 5
  • 16
1 2 3
99
100