Showing a link to a parent object

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
sath01
Posts: 20
Joined: Tue Feb 17, 2009 4:41 am

Showing a link to a parent object

Post by sath01 »

Can anyone help me with the best way to do the following please ?

I want to show a simple HTML link to a parent object. For example, I have a 'Contact' BO that has a parent 'Organisation' BO, which is a computed attribute on the Contact BO.

Within the contact BO form, I want to show the name and org number attributes from the organisation object as a text URL link allowing the user to click on it and open the parent organisation.

I know I can put the parent object on the form and use a table or drop down view to show it, but the table view is just plain ugly when used this way, and the drop down doesn't show as a link.

I have played around with putting an HTML cell on the form, and this works well, except I can't find a URL to open / edit a BO given it's ID or something. Is there a URL that will do this ?

Playing with presentations yields the following link that might work, but using an internally generated link is not always the wisest way to go, since it could change in the future:

javascript:Ext.ComponentMgr.get%20('BAS_CUSTOM_QUERY_50055').m_parser.navigateToEntity('Organisation','616');

Anyone have any simpler Aware IM Sanctioned ways of doing this ?

Thanks in advance.

Steve.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Hi Steve,

You can use a HTML button as defined at:
http://www.awareim.com/forum/viewtopic.php?t=3005

You can link it to a process which takes your Contact as Process Input & Edits the associated Organization. The Edit form will appear as a modal form since it's executed from a process.
Tom - V8.8 build 3137 - MySql / PostGres
sath01
Posts: 20
Joined: Tue Feb 17, 2009 4:41 am

Post by sath01 »

Thanks Tom, that sounds like it will do the trick. I had a try using the run process, but it kept asking me to pick the contact, it didn't get it from the context of the form.

I have just realised I am running V4.1 build 1158. I know it's a silly nOOb question, but how do I upgrade to the newest build (I see you're running 1166) ? Is it fully supported (ie - not just a beta) ? Is there a list of changes for the builds ? Do I need to upgrade the server AND the config client (which I run separately) ? Oooh, and everything !

Cheers,

Steve.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Hi Steve

1- List of changes in builds: http://www.awareim.com/changelog/

2- Login to your account at http://www.awareim.com/my_account_iframe.html for the latest builds.

3- Latest build are fully supported.

4- Yes, you need to upgrade all machines that you are operating.
Tom - V8.8 build 3137 - MySql / PostGres
sath01
Posts: 20
Joined: Tue Feb 17, 2009 4:41 am

Post by sath01 »

Thanks again Tom - worked a treat (once I realised that you have to setup the BASServer.prop file on the server again).

Just a note on the technique in the link, for others reading this. The new function "startProcessFromForm" can also run in an <a> tag, as long as it's in the onClick event. It doesn't work using "javascript:..." in the href attribute. I suspect this means it will work on other, and maybe any onClick event.

Thanks again.

Steve.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Hi Steve,

Re:
The new function "startProcessFromForm" can also run in an <a> tag, as long as it's in the onClick event. It doesn't work using "javascript:..." in the href attribute. I suspect this means it will work on other, and maybe any onClick event.
Would you mind posting a complete example of the syntax you used?
Tom - V8.8 build 3137 - MySql / PostGres
sath01
Posts: 20
Joined: Tue Feb 17, 2009 4:41 am

Post by sath01 »

Tom,

Here is an example of the code. I wasn't trying to point out a problem, only that the code could be used in the onClick event of a link tag <a>, as well as a button.

Code: Select all

<a href="#" onClick="AwareApp.startProcessFromForm('EditSourceFromBillable', 'main', this, false)" >
<<Billable.SourceObjectNameSC>><br>
<<Billable.SourceAccountEntryTitleSC>></a>
Cheers,

Steve.
Post Reply