Create one-to-one relationship

Dear all,

I’d like to ask you for community help with problem. I’m programming 3re party script which will generate quote (in AOS_quotes module) from automatically from Calls module.

A customer needs to create a relationship between quote and campaign, which is related to call record.

I can create it via SOAP API and method set_relationship (manualy in SuiteCRM GUI it works properly).

What I did?

  1. I have opend a Campaigns module in Studio and created a relationship between Campaign and Quotes module - relationship_type is one-to-one (there was one possiblity only)

  2. I the phpmyadmin I have checked that there has been created a table with name campaigns_aos_quotes_1c.

  3. The sequcence in PHP script is

$relationship_result = $aSOAPclient->set_relationship( $loginResults->id, 'AOS_quotes', $Quote->id, 'campaigns', [$aCall['campaign_id_c']] );

Can you help me, what it doesn’t work? Where is a mistake?

Thank you in advance.

Martin

inside suitecrm

admin > studio > campaigns > relationships

you should be able to add 3 relationship types

1-1
1 to many
many to many

to confirm your process
Will a campaign have more than 1 quote linked to it?

Will a quote have more than 1 campaign linked to it?

1 Like