Marty C.
  • Member for 8 years, 3 months
  • Last seen more than a month ago
5 answers
votes
11k views
Installing managed packages to Scratch org via configuration
12 votes

As example with the Salesforce CPQ 216.10.1 package, you can do the following. Create the force-app/main/default/installedPackages directory Create a file named SBQQ.installedPackage-meta.xml inside ...

View answer
5 answers
votes
15k views
How to call a Salesforce REST URL from Lightning Component?
11 votes

Peter, the unfortunate answer (I think) is that based on how Lightning currently works in Winter '15, we may not have a direct way of connecting to any of Salesforce's REST APIs. As a workaround, it ...

View answer
3 answers
votes
9k views
apply new workflow rule and action on existing records
Accepted answer
10 votes

nivyaj, I posted an answer to the same (or very similar) question that another admin found helpful: When does the time-based workflow put records in it's queue? The possible solution is: Create a ...

View answer
2 answers
votes
461 views
Model in Model View Controller
8 votes

The correct answers are Custom Object and Apex, assuming that by Apex the writer behind the question meant the Apex properties inside controllers and extensions. I won't bore you with what you can ...

View answer
2 answers
votes
17k views
How to remove items from a dynamic list in Lightning component?
Accepted answer
8 votes

Luckily the aura:iteration component has a super convenient, built-in attribute called indexVar. By leveraging indexVar I am able to pass the array index to the controller action, which can then use ...

View answer
1 answers
votes
2k views
Unit Tests: create completed tasks for ActivityHistory?
Accepted answer
8 votes

David, have you tried setting the SeeAllData modifier to true for your test class? I tried out your code, and it appears that in order for you to validate that the ActivityHistory table was populated,...

View answer
2 answers
votes
11k views
How do we get user's time zone offset integer in Apex or Formula Field?
6 votes

I'm late to the party, but in trying to tackle the same problem I arrived at the approach below for getting the exact value of the time zone offset. I hope this becomes useful if you ever face the ...

View answer
1 answers
votes
870 views
Outbound messaging wsdl
Accepted answer
6 votes

Sara, the SOAP API Developer's Guide implies that the messages will be grouped together when possible for efficiency's sake. This means when you load 250 records in a single operation, you should ...

View answer
2 answers
votes
4k views
How can I know which button was clicked?
Accepted answer
5 votes

I feel like there should be a better solution, but one way to achieve what you're trying to do is to create a separate component to put inside your aura:iteration. So, let's say you edit your aura:...

View answer
2 answers
votes
7k views
CSV Parser for 'Importing large CSV files via Batch Apex '
5 votes

Try this ImportCSVJob class as a reference implementation of Database.Batchable and Schedulable. The class demonstrates how you can use CSVReader to read CSV data, construct new records and then ...

View answer
2 answers
votes
6k views
Elegant initialization of Lightning aura:attribute
Accepted answer
5 votes

In Winter '15, it seems that all fields that will be data-bound need to be explicitly initialized in the default attribute. In situations where I don't want to go through the hassle of explicitly ...

View answer
1 answers
votes
9k views
How to deploy field dependencies using change sets
5 votes

user10060, it looks like all you need to do is just add the controlling field and the dependent field to the change set, and the field dependencies will be included. If your controlling field is a ...

View answer
1 answers
vote
1k views
Apex managed sharing for customer community plus users
4 votes

You don't need to do anything special to "enable" Apex managed sharing for Customer Community Plus users. You just need to make sure the code that manipulates Share records runs in system context, ...

View answer
3 answers
votes
4k views
How to test apex code that is driven by formula fields (Best Practice)?
4 votes

First, thank you, Ralph, for asking this question and putting yourself out there. As a matter of communication I don't mean to call you out on anything at all, but I want to give a detailed, (...

View answer
1 answers
votes
1k views
How to deal with Activities in a Case Hierarchy?
4 votes

To borrow a consulting cop-out, I think the answer depends on your business processes and objectives. Girbot made a great recommendation to engage the business in conversation on this topic. Or, put ...

View answer
2 answers
votes
133 views
Lightning ToolingAPI BETA Documentation
4 votes

Uwe, yes, it is possible to save a single AuraDefinition object via the Tooling API, right now in Winter '15 (API 32.0). I confirmed this using Workbench. Your endpoint for updating the ...

View answer
2 answers
votes
2k views
Get list of all Custom Tabs in an org, including the creator of each
3 votes

As an alternative, perhaps you can take the following approach instead for communications and the purge. Compile a list of users who have recently logged in from the login history. Notify the ...

View answer
4 answers
votes
2k views
How to test a class with no methods?
3 votes

First, you should know that your getters and setters themselves are methods. Just because you're using shorthand syntax doesn't change the fact that you're implicitly creating methods. /** * ...

View answer
1 answers
votes
748 views
Significance of getRelationshipOrder() in Master-Detail DescribeFieldResult?
Accepted answer
3 votes

@zachelrath, the below info from Salesforce Help & Training may answer your question. The first master-detail relationship you create on your junction object becomes the primary relationship. ...

View answer
2 answers
votes
2k views
How to query required fields using SOQL
3 votes

Joshua, I assume you're trying to do this programmatically in Apex. If so, you should be able to leverage Accessing All Field Describe Results for an sObject and Describe Field Result Methods to ...

View answer
2 answers
votes
878 views
Lightning Component Controller
Accepted answer
2 votes

Despite implied promises in the docs that you can directly invoke instance-specific Apex methods from JS, this is not possible at present (re: Case 16394449). So in the Lightning Components world, ...

View answer
1 answers
votes
2k views
Lightning Process Builder - Error Handling
2 votes

At this time (Spring '15) I don't know of a way to both prevent the DML operation and to display a user-friendly error message. You may want to promote this idea titled, "Process Builder: Error ...

View answer
2 answers
vote
2k views
Lightning: Create new instance of aura:attribute of custom Apex type with default values
2 votes

Natallia, I actually asked the same question back in Winter '15, and I'm not sure whether the process is any different now in Spring '15. You can take a look at the answer to my question for specific ...

View answer
3 answers
votes
964 views
How to use the REST API to get array from the Opportunity Object in JSON format from the Opportunity object using SOQL?
2 votes

Chris, getting the data into a Visualforce page is pretty straightforward. All you need is an Apex controller. The sample Visualforce page and Apex controller below illustrates how you can pull the ...

View answer
4 answers
votes
3k views
What is the best practice for initializing test data for multiple test methods?
Accepted answer
2 votes

I second Lance's point that methods not marked as testMethod in a test class have no impact to Salesforce's calculation of code coverage. This means you can have as many methods as you want that aren'...

View answer
1 answers
vote
1k views
Custom Button to mass update records
Accepted answer
2 votes

@UnderDog, what you're describing can most easily be implemented as a custom button that invokes JavaScript. Take a look at Salesforce Help's sample Mass Delete button, and from there I believe you ...

View answer
1 answers
votes
4k views
How to get current communityId on visualforce page?
2 votes

Natalia, your question actually answered my question, which was how to get the Community ID to my Apex controller for a Visualforce component. I think you have answered your own question, which is to ...

View answer
1 answers
vote
957 views
How to query a community with SOQL
Accepted answer
2 votes

@Jodi, what are you trying to query? If you're looking for chatter feeds that are specific to one community, then the documentation you're reading should give you the data you need. However, with ...

View answer
1 answers
vote
104 views
Do I need to go through AppExchange security view to release an App that authenticates with OAuth?
2 votes

If you don't want to list the app on the AppExchange, there is no need for you to go through the security review process. You will miss out on benefits such as being listed on the official AppExchange,...

View answer
1 answers
votes
226 views
Just in Time SSO
2 votes

Sara, are you trying to create users in Salesforce on the fly, using Just-in-Time provisioning? If so, have you tried specifying the User.ContactId attribute in your assertion? I think if you add an ...

View answer