Assign attribute to multiple business objects

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
kklosson
Posts: 1646
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Assign attribute to multiple business objects

Post by kklosson »

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?
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

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
kklosson
Posts: 1646
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Post by kklosson »

It does, thank you.
Post Reply