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.


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)
  • 2
    you might be missing a lookuprows call to retrieve the EventsLog table. You also havnt declared EventsLog
    – 0xsegfault
    Feb 21, 2018 at 16:46
  • agree with Data_Kid. @Event_Logs is undefined in the code snippet provided. Feb 21, 2018 at 20:32
  • @Data_Kid, I have a question on how triggered sends fundamentally work in conjunction with the referenced data extension in the Trig send definition... Since SObject and RecordId are both attributes of the DE what happens when there is no records populated there. My assumption was the data extension is empty until it's populated with data from the triggered send, then the AMPscript is to populate data from that record in the DE which had just been created. The reason I ask is because without a test record populated in my TS-DE I am unable to get the send to work. Please help.
    – Dom
    Mar 12, 2018 at 17:56

1 Answer 1


Thanks for the responses guys!

I updated my AMPscript to the following and it's working as required now:

Set @myCustomObject = SObject
Set @myRecordId = RecordId
Set @EventLog = RetrieveSalesforceObjects(@myCustomObject,'Contact_First_Name__c,Latest_SSD__c','Id','=',@myRecordId)
Set @EventLogsRow = Row(@EventLog, 1)
Set @ContactFirstName = FIELD(@EventLogsRow,'Contact_First_Name__c')
Set @LatestSSD = FIELD(@EventLogsRow,'Latest_SSD__c')

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .