9

Not specific to this scenario, the below applies in general Don't write Unit tests with focusing only code coverage as target. We should focus on writing tests with both positive and negative scenarios, then ideally your edge cases gets picked up.. It's definitely a time consuming exercise but it's worthy effort. So don't skip writing additional test ...


9

Last I checked, Workflow performs significantly better on CPU Time. That on its own is a compelling argument to reverse your assumption. Instead ask yourself why you would use Process Builder when you can instead use Workflow. Setup: Custom Object: Object_With_Workflow__c Set up a Workflow Rule Evaluate the rule when a record is created, and every time ...


7

Package Update Automation When you deploy to your packaging org, specify the autoUpdatePackage setting. Then if you wish use the retrieve to download and commit the new package.xml back into your Git repository. Though personally i consider this step optional, since the package.xml in the packaging org is typically not the one you want to manage in your ...


7

List<User> usersToUpdate = new List<User>(); for(User u : [Select id, IsActive from User where isActive=true and lastLoginDate <= :DATE.TODAY()-120]){ u.IsActive = false; usersToUpdate.add(u); } if (usersToUpdate.size()>0){ update usersToUpdate; } There are some considerations to do this: -- one cannot deactivate ...


7

I'll add: When working with e-mail alerts, the setup UI knows which workflow rules use any given alert and will show you this in a very simple way. The setup UI has no idea which Process Builders use any given alert and the only way to conclusively "reverse search" this is to retrieve the metadata. So whenever we need to fire an e-mail alert I lean towards ...


6

Take a look at this help article: Considerations before having Create Audit Fields enabled: Salesforce has the ability to set system fields through the API. When you are migrating data from an external system, the API lets you set a number of fields on objects that were previously read-only. By setting these fields, records will appear to have been ...


6

If you're willing to take the time, the SandboxPostCopy interface lets you write code that's called once upon refresh. You could write a bunch of code to populate records. If you're planning on moving to DX, force:data:import lets you import JSON files into your orgs using the new SObject Tree API, which automatically creates records and associates them with ...


6

In lightning: you can do that using Set Predefined Field Values for Quick Action Fields. Here you predefine values for the new record created in quick action attributes and thus they gets prepopulated when you click the quick action button. In Classic : In classic you can use URL hacking : Here you pass the FieldID and its value in URL params and they get ...


5

To get started with Programming on the Salesforce platform, please refer to a different post - Learning development with Force platform. Any good books?: You are going to want to start with Force.com Fundamentals. This doesn't focus on Apex/Visualforce, but rather than base platform. Coding in Salesforce doesn't happen right away. You need to have a great ...


5

Add the ProgramID to the Properties list when making the retrieve. The Automation object has a few issues with it.


5

First, your Real usage seems wrong to me: This happened because of the case that accountMap didn't contain the key and Map#get(key) method will raise an exception False! If a Map does not contain a key, it will simply return null I have replaced the Map#get(key) with Map#containsKey(key) to correct this (which will return boolean instead of raising ...


5

You can certainly check the start and status of an Automation using a SSJS Script Activity. If you don't see it in your list of Activity types, SFMC Support can enable it for you. Here's an example that retrieves and starts an Automation if it's not already running. <script runat="server"> Platform.Load("Core","1.1.1"); var automationCustomerKey = ...


5

There is a new Verification Activity in Automation Studio. You can set this to verify if there are no subscribers in DE then stop the automation. This will prevent the error. New Verification Activity Add the new Verification activity to automation workflows to help increase confidence in running journeys and prevent unintended outcomes that may ...


5

The issue is that the column AutomationTasks is not a retrievable property in the Automation object. From Describe call on the object: <Properties> <PartnerKey xsi:nil="true" /> <ObjectID xsi:nil="true" /> <Name>AutomationTasks</Name> <DataType>AutomationTask[]</...


4

Sense Check. If I have understood correctly you have reached a point where all your metadata and code for your solution is in SVN, nice! Then I assume you have developers deploying from that into orgs to perform development. Such as adding custom fields to Account and then downloading the Account.object file to commit back into SVN. Here you are finding ...


4

An ID isn't ever N/A. It will always be one of null, a 15 character ID, or in most cases, an 18-character ID. If you're checking to see if the ID refers to a record whose name is N/A, you'll need to query that data separately. Most likely, you can just change the query to include, for example, Associate_Creative_Director__c, Associate_Creative_Director__r....


4

For automating testing and builds in general, I would try Jenkins: http://blogs.developerforce.com/developer-relations/2013/03/setting-up-jenkins-for-force-com-continuous-integration.html Which has a Selenium plugin too: https://wiki.jenkins-ci.org/display/JENKINS/Selenium+Plugin tbh, discussions around automated UI testing always seem to gravitate around ...


4

I think the easiest approach would be to export all the OpportunityLineItems (Products) that you need to update (via a report or dataloader export, making sure you include the OpportunityLineItem.Id), then update the .csv (new columen CB=True I assume) and use the dataloader to update the OpportunityLineItems. You could propbably do this with an execute ...


4

There is no way you can officially get access to the Salesforce1 IPA and APK files. Of course, there are other tricks in which you can recover these files from the device but they wilL NOT obviously be re-signed for 3rd party testing. Considering your requirement, the best way to do mobile automation testing is to use the Chrome iOS emulation capabilities ...


4

Yes, you should absolutely be making use of the config.properties file - it's best practice. You can then add all of your UN and PW to it and adjust the key's accordingly. project/config/config.properties sfdc.endpoint=https://login.salesforce.com sfdc.username=................ process.encryptionKeyFile=C:\\Users\\gazaino\\Projects\\DL\\key.txt sfdc....


4

Short Answer: No Explanation: The two methods of exporting data from a data extension are : If the file is less than 20 MB it can be downloaded to your pc. Files larger than this will have to be collected from the FTP location. Reference: Exporting Data Extensions NB: For security reasons, your administrator might have set the export to the FTP ...


4

The issue is with SMTPBounceReason. This field can return an excess of 4000 characters. To bypass this, remove leave the length field blank. This will force it to VARCHAR(MAX) (Over 4000 characters). Resources: Override Maximum Character Length


4

Once a process in Process Builder has been activated, it cannot be modified, only cloned. Conversely, a workflow can mostly be modified while it is active. For orgs that might need to update their workflows regularly, just modifying the workflow rather than having to clone and reassign is much simpler. Creating a process requires Manage Force.com Flow and ...


4

I'm not sure I prefer one over the other, but one thing that keeps pulling me back to workflow rules is that I can easily see all the field updates and where they are used. Process builder hides the actions in the process and it is hard to find the process that does "x".


4

It's not enough to remove access to the tab, or, strictly speaking, field level security. You need to remove access to the object itself (turn off "Read Object", e.g. "Read Accounts"). Triggers are not generally affected by the sharing model or profile permissions, so even if the user can't view/edit a given record or object, it won't stop the trigger from ...


4

Usually what I do in these types of automations is include a second 'failsafe' script activity after the one used to initialize the next automation. I have found that depending on the activity in the account, a start automation API request in a constant loop can be 'lost in the nether' and although infrequent, can completely screw up your whole process. So ...


4

Technically you could use a measure in SQL if you wanted to. This would come with the stipulation that you would need to join data from your sendable data extension to the subscriberid/list related data that would be returned from a measure. Create measure. Use the measure in a data filter and populate a pre-defined data extension with the results from it ...


3

It turns out that a free 3rd party app from the App Exchange for handling mass edits and updates provides this functionality. Edit As requested, the app is Mass Update and Mass Edit by Salesforce Labs.


3

These are listed in the metadata API guide http://www.salesforce.com/us/developer/docs/api_meta/ AccountSettings ActionOverride ActivitiesSettings AddressSettings AnalyticSnapshot ApexClass ApexComponent ApexPage ApexTrigger AppMenu ApprovalProcess ArticleType AssignmentRules AuthProvider AutoResponseRules BaseSharingRule BusinessHoursSettings ...


3

Kelly was almost right here - it is actually the time that is the problem. When selecting from the drop down list for the time (in my case at least), I have the choice of 0:00 - 23:30 (24hr format) and the text then displays as so when selected in the drop down. The time however needs to be in 12 hour format e.g. '13:30' needs to be '1:30 PM' - so using ...


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