Use referenced attibutes on create

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
jkovar
Posts: 20
Joined: Wed Feb 08, 2006 2:01 pm

Use referenced attibutes on create

Post by jkovar »

I would like to have an option to populate fields when creating an object with referenced attributes.

Example: Business object Companies has referenced object Contacts. When using the ADD NEW button from the Company Form to create a new Contact for the Company, I would like the option to use the Company Address, Phone, Etc for the contact if it is the same. (My implementation allows contact addresses to be unique from company addresses)

Is there a process or command that could be added to the Add Contact to allow the Contact information to be filled from the company info?

It would be OK if the fields defaulted to the Company info upon create if that is easier.

It would be nice if I could have a button or line that said (Use Company Address) and it accomplished the task.

Thanks,
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

You can do both. To automatically set the address, add the following rule to object Contact:

If Contact.Address IS UNDEFINED AND Contact.Company IS DEFINED Then
Contact.Address = Contact.Company.Address


To allows the user to set the address by clicking an icon, add a process with the following rule:

Contact.Address = Contact.Company.Address

and add an operation to the Contact form that starts this process.
Aware IM Support Team
jkovar
Posts: 20
Joined: Wed Feb 08, 2006 2:01 pm

Clarification

Post by jkovar »

I understand and got the process option to work. However, the contact must exist for this process to be available.

What I am trying to accomplish is as follows.

The Company BO exists.
I click on the + to add a Contact (refer object) and the input form appears.
The Contact does not yet exist, but I want to be able to prefill the Address from the Company I am adding the contact to at the same time as and before hitting Create for the Contact.

Hope this makes sense. In summary, I am trying to pre-fill attributes with data from a reference object before the new object they are attahced to is created.
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

The initialization rule should work even for new objects being created. Please try it. You should see the company address on the form for new Contact object. Have a look at the Log Viewer to see how and when this rule is executed.
Aware IM Support Team
Post Reply