[Event System] Expecting a IRecord event argument, none was provided

[Event System] Expecting a IRecord event argument, none was provided

  
Forge Component
(30)
Published on 15 Jan by leonardo.fernandes
30 votes
Published on 15 Jan by leonardo.fernandes

Hi Leo,

Good Day!

I'm studying on how to use the GetArgumentRecord/ProvideArgumentRecord.

But I encountered the above error.

I guess I'm doing it incorrectly.


Need your kind assistance.

Thank you very much,

Best regards,

Chris

Solution

Hi Christopher.

The way you are using GetArgumentRecord and ProvideArgumentRecord is almost correct, but they should only be used with the Event System actions (Invoke and Trigger). Using them with the Notify system action does not work.

Another thing you would need to change is that you're passing a record list, and not a record: Var1 data type is Wine, WinePicture Record List.


If you need to use the system action Notify, then I suggest you to convert your data structure to JSON, and pass the JSON on the Message parameter of the Notify. Then use the NotifyGetMessage system action to retrieve the JSON and convert it back to your data structure.

Solution

leonardo.fernandes wrote:

Hi Christopher.

The way you are using GetArgumentRecord and ProvideArgumentRecord is almost correct, but they should only be used with the Event System actions (Invoke and Trigger). Using them with the Notify system action does not work.

Another thing you would need to change is that you're passing a record list, and not a record: Var1 data type is Wine, WinePicture Record List.


If you need to use the system action Notify, then I suggest you to convert your data structure to JSON, and pass the JSON on the Message parameter of the Notify. Then use the NotifyGetMessage system action to retrieve the JSON and convert it back to your data structure.


Hi Leo,


Apologies for the very late response.

Will apply changes.


Thank you very much for the help.


Kind regards,

Chris