How to attach note to asset transfer transaction

Is it possible to add a note as a parameter when transferring an asset from one account to another? I have tried encoding a string as a defined parameter when transferring an asset yet I get an error. Is the note parameter only possible for payment transactions?

It should work without any issue. The note field is a common field to all transactions:

Can you please show your code?