Jump to content

Go to Related Record (GTRR) confusion


This topic is 6102 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a database where the go to related record work on one layout and not the other. It works in a T.O. relationship between Organization and Individual (a one to many relationship in my case). In the Organization layout I have a portal with all the employees of that organization. A button within the portal takes be to that particular employee's record in the Individual layout. The button runs on a script.

I also have another layout where it does not work. And it does work. (Yep, confusing, I know). I have a portal in an layout called Invoice. The portal shows all the individual line items and, like to Organization/Individual relationship, the Invoice/Line Item is a one to many relationship.

In the portal on the Invoice layout I have the same set up as with the Organiztation layout. I have information from the line item and a button, run on script, to take me to the individual line item. However, it does not take me to that particular line item. Rather, it takes me to the first line item that is related to the invoice.

To add to the confusion, I added a button that is NOT running on a script. The button is simply "Go to Related Record." And that works!

Attached is the relationship graph for these two layouts. The Organization layout shows information from the Organization T.O. and the portal is Org to Ind. The Invoice layout shows information from the Invoice T.O. and the portal is Inv. to Line Item.

I would like to know:

1). Why does the GTRR work on the Organization/Individual relationship and not the Invoice/Line Item?

and

2). Why does the button GTRR work and not the scripted version?

Thanks.

dan

Relationship_Graph.pdf

Edited by Guest
Link to comment
Share on other sites

Yes, the GTRR in the script goes to the right table and the uses the right layout: T.O.:Org to Individual / Layout: Individual for the Organization and T.O.:( Inv to Line Item /Layout: Line Item for the Invoice. Thanks for asking about that; I apologize for not including it in my post.

Link to comment
Share on other sites

You are hopefully aware what you write is impossible, you will always pick a layout belonging to a unique table occurrence (TO) not a table, which have to be tied to the TO you present layout is build upon.

This means that the same script not will work in both TOG's

In the portal on the Invoice layout I have the same set up as with the Organiztation layout. I have information from the line item and a button, run on script, to take me to the individual line item. However, it does not take me to that particular line item. Rather, it takes me to the first line item that is related to the invoice.

You must have in the beginning of your script done something that commits the record, so the GTRR looses focus, just before being executed.

--sd

Link to comment
Share on other sites

This means that the same script not will work in both TOG's

Thanks Soren. My intention is to have the same script but to use parameters. However, when the Inv to Line Items did not work, I made it into a seperate script (see attached). It still does not work. I am befuddled why GTRR script works in the Org to Individual portal but not the Inv to Line Items portal. Also, I am really confused why the Button Setup command GTRR does work in the Inv to Line Items portal.

Org_to_Ind.pdf

Inv_to_Line_Items.pdf

Link to comment
Share on other sites

Can't you upload a clone instead, or a replica of the situation ...my guess it's quite straight forward, and while you make it sees with your own eyes where the flaw is.

But what I see is that you forgets to go to the layout of tied to the second TOG??? For the last two branches of the conditional statement in your script. In a broader sence might there be a few more Go To Layout statements ...is it pre fm7 kind of reasoning goin on here?

--sd

Edited by Guest
Link to comment
Share on other sites

May I suggest that you write a script that does the Adjust Window Resize to Fit, and Hides the Status Area. Then call that script at the end of your GTTR script.

During development, I have such a script, and keep the Status on Show until dev is done.

Also, name your primary keys with doubleunderscores, "__kP_PrimaryID," so that they are alphabetically first--very helpful in the graph.

See attached sample.

GTTR_Sample.zip

Link to comment
Share on other sites

Thanks for posting the file. In your GTRR script, you have a new window script step. As soon as the new window appears, you are out of the portal, focus is lost (as Soren guessed), and your gtrr fails.

Remove the new window script step, and use the "In New Window" result option in the gtrr script step directly.

Link to comment
Share on other sites

This topic is 6102 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.