parent_id doesn't work when creating note with REST API

I am creating a note with the REST API which works fine but I want the note to be associated with a Leads.

I found several threads on Sugar CRM that says you cant do this by setting parent_type and parent_id (https://community.sugarcrm.com/thread/24481)

I set “parent_type” to “Leads” and “parent_id” to the ID of my lead I want to attach new note to but it does attach it.

Is this functionality present in SuiteCRM?

I have just tried setting the relation with a “set_relationship” call and it returns “Created: 1” but the relationship is not created.

Is this a bug with SuiteCRM?

Nevermind, there was an issue in my code producing wrong ID. I got it working now