6 Replies Latest reply on Sep 15, 2013 2:12 PM by Mike_Mitchell

    How can I access an external data source layout via a script?

    websalesabc

      Hi everyone. I have a number of databases that I want to connect to a central one. Getting the External Table Occurances up and running is no problem. However. Database A is my central one and I want to be able to access the others via this one. When I use a Button and the Go to Related records script, it is no problem, but I want to go to a database based on options that vary from record to record so a fixed button does not work. It will be great if I could navigate to the correct External Record Layout by selecting an option from a Drop Down list and using a script trigger to go OR via a portal that displays all the relevant child records. The problem is that the Go to relted Record script function does not seem to work except if it is selected from a button via the Button Setup options.

       

      Is there any other way I can go to an External Record Layout?

       

      Thanks

       

      Joh

        • 1. Re: How can I access an external data source layout via a script?
          wimdecorte

          The Go To Related is a script step and will work in any script no matter how the script is triggered (button, trigger, ...)

           

          Can you describe the scenario under which it does not work?

          1 of 1 people found this helpful
          • 2. Re: How can I access an external data source layout via a script?
            reelsteve

            Are you saying that you want to be able to goto a layout which is based on a table / table occurence residing in your external data source ?

            Apologies if my late night brain is misreading.  If that is the case, you can make layouts and assign the external datasource table as the root table just the same as you can the tables which reside in the local db.

            In the manage database window where you are setting up your relationships, if you look at the dropdown, you will see your local file as an optional source to view and you should also see your external data source files which, when selected, give you access to assign any of the tables from the external db.  I attached a screengrab.  externalDataSourceInGraph.jpg

            • 3. Re: How can I access an external data source layout via a script?
              Mike_Mitchell

              Or are you saying you need the layout to be dynamic (i.e., a different layout depending on conditions)?

              • 4. Re: How can I access an external data source layout via a script?
                websalesabc

                I Created a Drop Down List with a value list of all the external files e.g. File One, File Two etc. My script trigger is On Object Modify. The script that I have linked to the Drop Down list is a simple if conditional ascript. To ensure this pasrt works I've included Custom messages at every if statement before the Go To Related Record script should execute.

                 

                The confusing issue is that everything works 100% but the Go To Related does not work at all. However If I use a button that under the Button Setup utilises the Go To Related Record option, it works fine. If I create a script with only the Go To Related regord script step and nothing else and set the button to Perform this script, nothing happens. It does not work. I've checked 100 times that the settings in the Go To Related Records scripts are the same.

                 

                So the Go To Related Record script does not seem to work at all when it is in any script. It only works when linked to a button via the Button Setup option.

                1 of 1 people found this helpful
                • 5. Re: How can I access an external data source layout via a script?
                  BruceRobertson

                  You conclusion is definitely false.

                   

                  However, the location of the button is important and may be something you are missing.

                   

                  Where exactly are the buttons that do work - are they in portals? If so, they have context.

                   

                  So far you haven't provided copies of your scripts or other detailed supporting information necessary to actually identify the problem.

                   

                  It would be helpful if you would post copies of your files; or build simple example files which demonstrate what you are trying to accomplish; and post them.

                  • 6. Re: How can I access an external data source layout via a script?
                    Mike_Mitchell

                    You don't include what "Go To Related Record script does not seem to work at all " actually means. However, it's entirely possible that the relationship is not properly established after the value list is selected. If the record is still open, then the relational join may not be properly refreshing. Does your script include a Commit Records script step prior to attempting the Go to Related Record?

                     

                    Mike

                     

                    P.S. Bruce is definitely correct; Go to Related Record works just fine in a script. Something else is wrong with your setup.