When I create a new task using ampscript, a Task is created but 2 tasks are creating at a time. here is the code
SET @id=CreateSalesforceObject('task',7,'WhatId',@opportunityid, 'OwnerId',@ID,'CompletedDate__c',@Currentdatereformatted,
'ActivityDate',@Currentdatereformatted, 'Subject',emailname_, 'Status', 'Completed','Priority','Medium')
Text-version
of your email.