I would like to create a script activity in an automation to update a Salesforce Object.
Here is my example script. How can i update I get it accepted as A SSJS script in the Script Activity?
%%[
var @rowCount
set @rowCount = DataExtensionRowCount("ENT.My_DE")
var @nmaratasDE, @rsRow, @i, @Contact_ID, @PhoneNumber
SET @nmaratasDE = LookupRows("nmaratasDE")
IF RowCount(@nmaratasDE) > 0 THEN
FOR @i = 1 to RowCount(@nmaratasDE) DO
SET @rsRow = Field(Row(@nmaratasDE, @i))
SET @Contact_ID = Field(@rsRow, "ContactID")
SET @PhoneNumber = Field(@rsRow, "MobileNumber")
)
set @result = UpdateSingleSalesforceObject('IN_Contact__c', @Contact_ID, Phone_Num_c, @PhoneNumber)
]%%