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
9 votes

Better practice to analyse and quantify code coverage with OR conditions

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 ...
Vamsi Krishna Gosu's user avatar
9 votes

How to trigger an automation from another automation

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 ...
Adam Spriggs's user avatar
  • 30.7k
9 votes

Workflow versus Process Builder. How to choose which to use?

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 ...
Adrian Larson's user avatar
  • 150k
8 votes
Accepted

How can we inactivate user those are not logged in last 120 days

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; ...
kso's user avatar
  • 323
7 votes

How to automate data import on full sandbox refresh

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 ...
sfdcfox's user avatar
  • 493k
7 votes
Accepted

can i run an automation only when a data extension have data or records?

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 ...
Gortonington's user avatar
  • 30.6k
7 votes

Workflow versus Process Builder. How to choose which to use?

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 ...
Charles T's user avatar
  • 11k
7 votes
Accepted

How to pre-populate fields when creating a new record?

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 ...
Pranay Jaiswal's user avatar
7 votes

Update Salesforce object with a Script Activity

You can't execute AMPscript directly from a Script Activity, since they're only for server-side JavaScript code. There are also no SSJS functions for updating SF objects. You can, however, force ...
Adam Spriggs's user avatar
  • 30.7k
6 votes
Accepted

How to edit the "created by" field for case attachments?

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 ...
Adrian Larson's user avatar
  • 150k
6 votes

Salesforce Command line Dataloader - Passing Parameters to Process-conf.xml ?

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....
zainogj's user avatar
  • 1,854
6 votes

programatically create Partner Community Accounts using Apex / API

To enable the accounts as partner accounts, set the 'IsPartner' field to true after creating the account (it cannot be done during creation, only by update). Account partnerAccount= new Account( ...
Guy Clairbois's user avatar
6 votes
Accepted

Automation studio SFTP file drop trigger to Import Activity

So the way I solve file conflict scenarios if I have no control over the file naming patterns is: Create 2 File Locations pointing to 2 seperate folders in your FTP: File Locations: import/...
thechrishaddad's user avatar
6 votes
Accepted

Automation Query Error in Marketing Cloud

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). ...
0xsegfault's user avatar
  • 6,603
6 votes
Accepted

Create or update Automation with Marketing Cloud REST API new endpoint

I made some investigation and think that to create/update Automation using REST, it is needed to use .json payload in this format: { "id": "e906af34-4a19-42e9-9ce2-ac6413a77a09", "legacyId": "...
Maciej Barnaś's user avatar
6 votes
Accepted

SSJS Error retrieving the automation activities of an automation

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="...
Gortonington's user avatar
  • 30.6k
5 votes

Better practice to analyse and quantify code coverage with OR conditions

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 ...
Novarg's user avatar
  • 5,264
5 votes

Journey Builder: "Process all records" vs "New Records"

The location of this configuration has changed some in the last couple of years. It is still an option when using a Data Extension entry source connected to an Automation Studio automation. After ...
Travis Naughton's user avatar
4 votes

Process builder not activating in production

That gack is mentioned in this post, in which we're told is related to this known issue. You're encouraged to contact Tier 3 support if you get this error. They have a fix. They don't say what causes ...
sfdcfox's user avatar
  • 493k
4 votes
Accepted

Export Data Extension data to Email, not FTP?

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 ...
0xsegfault's user avatar
  • 6,603
4 votes
Accepted

Using Automation Studio to Export a Data Extension

This is easily done with an Automation containing a Data Extract Activity. Go to Automation Studio and create a new automation. Add a new Data Extract Activity, choose a name, a file naming pattern ...
Markus Dang - formerly Slabina's user avatar
4 votes

How to suppress contacts from marketing cloud email sends if they already got an email

One possibility would be including an Exclusion Script in the email that filters out subscribers present in the sent data view with a date of the current day or in your second case the last 7 days. ...
Markus Dang - formerly Slabina's user avatar
4 votes

Workflow versus Process Builder. How to choose which to use?

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 ...
IllusiveBrian's user avatar
4 votes

Workflow versus Process Builder. How to choose which to use?

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 ...
Daniel Hoechst's user avatar
4 votes
Accepted

Inserting an iframe in a Visual Flow

iframes have been disabled in Salesforce since 2015 to prevent clickjack. Please see resource here: https://help.salesforce.com/articleView?id=IFRAME-or-Web-Tab-Content-Displays-Blank-Page-...
Joe Hayes's user avatar
  • 372
4 votes
Accepted

Restrict tab access via search

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 ...
sfdcfox's user avatar
  • 493k
4 votes
Accepted

Automation skipped

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 ...
Gortonington's user avatar
  • 30.6k
4 votes

Use measure in SQL

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 ...
FreeRangeHotDogs's user avatar
4 votes

Automating File Move from Marketing Cloud SFTP Import to Export Folder

Salesforce Support are able to provision few custom Data Extracts having different functionalities, e.g. for deleting files. I seem to remember there is also an option of one specific type being able ...
Lukas Lunow's user avatar
  • 21.6k
4 votes
Accepted

PGP Encryption Marketing Cloud File Transfer

You need to upload your PGP key under Key Management in Setup. Select Asymmetric, fill out Name and External Key fields, and upload the file containing your public PGP key: Find more information on ...
Lukas Lunow's user avatar
  • 21.6k

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