Set relationship between custom module and Note with SOAP API


I have created a custom module named “Purchase Order”. My module need to have options to upload files so I thought the best would be to relate my new module with the Notes module. So I create a One to Many relationship between my module and the Notes module.

Since I’m integrating from other application I’m using the SOAP API. With the API I’m able to create the Note and upload the document but I’m unable to se the relationship between my module and the note. I’m using the SOAP API set_relationship method but it always returns false.

Also when creating the Note I’m specifying the “parent_id” = PO record Id and “parent_type” = “MY_Module_Name” fields and in the List Layout for the Notes I can see that they are correctly set to my custom module record. But when I click edit they are not displayed. Also when I go to my custom module the “Notes” sub panel is empty so there is no relationship between them.

Any help is appreciated!

Can someone point me where can I find the errors on the server? Maybe that will give me a clue why this is not working.

Hi Techgeek,

You can turn on debug for logging in Admin -> System Settings and then view the logfile(sugarcrm.log) in the main directory.



Thank you Will. I figured it out once I enable the Debug in the logs. The problem with set_relationship was wrong name for the relationship name. My bad for that. However I’m still trying to figure it out why the “Relate To” is not set correctly when I edit the note. I think that this is not a standard relationship and in the drop down there is no value for my custom module.

Hii ,
I have same requirement. Did you get any way to achieve that?