AnsweredAssumed Answered

How to assign a bean to another when using 'flex relate'

Question asked by Jonathan Goodman on Aug 24, 2015
Latest reply on Aug 24, 2015 by Jonathan Goodman
I have a instance of a Task and would like to assign an account to this task. Tasks have a flex relate field where you can select and assign an account using the UI however I would like to do this with PHP.

I've loaded an instance of the task and account bean. I'm just trying to work out how to assign the account as a property of the task.

Is it best practice to load the account_tasks relationship and add the account or is it possible to assign it to an accounts property on the task and save the task bean?

As a task can only have one account the latter seems best but I can't find any examples of this and anything I've tried so far hasn't worked.

Outcomes