Created
May 20, 2025 12:06
-
-
Save katydorjee/8c831db066c217c2f2adbf1fd19bc499 to your computer and use it in GitHub Desktop.
Updating Data Extension Records Using SSJS in SFMC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script runat="server"> | |
| Platform.Load("core", "1"); | |
| try { | |
| var de = DataExtension.Init("DataExtensionExkey"); | |
| var payload = { | |
| Status : "Active", | |
| EmailAddress : "[email protected]" | |
| }; | |
| var result = de.Rows.Update( | |
| payload, | |
| ["SubscriberKey", "003ABCDEFGH"] | |
| ); | |
| Write(Stringify(result)); | |
| } catch(error) { | |
| Write(Stringify(error)); | |
| } | |
| </script> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SSJS Script Overview
This script updates a record in a Data Extension (DE) in Salesforce Marketing Cloud.
Key Components: