I've been reading a lot of forum posts and the user guide but I can quite figure how to do this because I've not used the required functions before.
Bottom line is I want to select all of the object assign to a particular person and assign them all to a selected person.
I can do this from a form where the list of assigned accounts are presented. I can launch a process from there. I just need to block out what my actions will be:
1. FIND all business objects WHERE Account.AssignTo=ThisPerson
2. PICK FROM Persons
Now I'm a bit lost as to the statements needed to set the assignments in the found ACCOUNTS to the picked person.
Can I get a nudge?
Assign attribute to multiple business objects
Hi,
If it was me, here's how I'd do it - I'd pick the new person that you want to assign the accounts to and store that person as a reference attribute in the LoggedInRegularUser BO. Then I'd find all the accounts that you want to re-assign and set the Account.AssignTo reference to the LoggedInRegularUser.NewPerson reference. Something like this should work -
PICK FROM Persons
LoggedInRegularUser.NewPerson=Persons
PICK FROM Persons
FIND ALL Account WHERE Account.AssignTo=Persons
Account.AssignTo=LoggedInRegularUser.NewPerson
I haven't tested it, but hope it helps,
Peter
If it was me, here's how I'd do it - I'd pick the new person that you want to assign the accounts to and store that person as a reference attribute in the LoggedInRegularUser BO. Then I'd find all the accounts that you want to re-assign and set the Account.AssignTo reference to the LoggedInRegularUser.NewPerson reference. Something like this should work -
PICK FROM Persons
LoggedInRegularUser.NewPerson=Persons
PICK FROM Persons
FIND ALL Account WHERE Account.AssignTo=Persons
Account.AssignTo=LoggedInRegularUser.NewPerson
I haven't tested it, but hope it helps,
Peter