Recently had a requirement to trigger a send from a custom object and am receiving an error when trying to test the Email with some AMPscript send a few attributes from the custom object from which we are triggering the send.
Error:
Invalid row (parameter 1) passed to Field function. Row is null or empty. Function: FIELD(@EventLogsRow,'Contact_First_Name__c')
My code:
%%[
Set @mySObject = SObject
Set @myRecordId = RecordId
Set @EventLogsRow = Row(@Event_Logs, 1)
Set @ContactFirstName = FIELD(@EventLogsRow,'Contact_First_Name__c')
Set @LatestSSD = FIELD(@EventLogsRow,'Latest_SSD__c')
Set @TestEventMessage = RetrieveSalesforceObjects(SObject,'Contact_First_Name__c,Latest_SSD__c','Id','=',RecordId)
]%%