Autocreating a BO based on info in other BO:s?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Autocreating a BO based on info in other BO:s?

Post by Rem »

This could be complicated to explain but I will try:

I have three BO:s

Compay
Job
Travel

Job is something you do for a Company so when registering a Job you always chose a Company.

Travel is the journey to the Company location.

Company hold information about the lengt of the journey (distance to that company).

So:

If you register a job I want a Travel to be registered automatically when I press save. All the info is allready there.

I know the date, the user, the info about the job and the length.

I.E I like a Travel to be created when I press save to save my Job.

How would you do that?

/Rem
christopherb
Posts: 304
Joined: Fri Jun 22, 2007 8:26 pm

Post by christopherb »

You can do that using a rule in your OB

IF Job IS NEW Then CREATE Travel WITH Travel.Job=Job,ob.attribute=value


Here is snippet from a long process of an app that creates and OB once another OB status is changed to "approved" and sets a due date..

CREATE Production WITH Production.Contract=Contract,Production.Status='New',Production.DueDate=BUSINESS_DAY_FORWARD(Contract.DateTimePosted,10)

Hope that helps...

Chris
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Post by Rem »

Finally came around to this and one more question arised. When I create the new object do I have to use shortcuts to make the referals to other objects to work?

Can I not refer directly to attributes in another object?

/Rem
Post Reply