4 Replies Latest reply on May 4, 2013 6:05 AM by SteveMartino

    Help with Script

    SteveMartino

      Title

      Help with Script

      Post

           Hi everyone.  I have what I hope is a simple problem with these 2 scripts.  The one on the top works.  It's for the desktop, and opens up the Equipment layout in a new window.

           The one on the bottom is for the iPad--it doesnt work.  I don't want it to open into a different window.  All the parameters are the same.  I duplicated the script, and removed the new window steps, changing the layouts. 

           It goes into the right layout, but doesnt set the Equipment::Customer ID field (leaves it blank).

           Any thoughts/ideas would be greatly appreciated.

           Thanks

           Steve

        • 1. Re: Help with Script
          philmodjunk

               I don't see how either version of your script can correctly set the ID field. Once you have created a new record, the new record's empty matching field will keep the set field set from correctly entering the value from contacts as it is referencing a record that is now inaccessible.

               In both versions, you need to use set variable to capture the current contact ID before changing layouts and creating a new equipment record.

          • 2. Re: Help with Script
            SteveMartino

                 Thanks for your response Phil.  Actually, the first one works only because you gave me a solution to a previous post about copy/paste into the field.  But it does work.  I'll try changing it again to see if it helps.

            Is there a better way to do this script?  Here's the post, unless I did something wrong and it worked in spite of myself :)

                 Steve

            • 3. Re: Help with Script
              philmodjunk

                   Set field should be used instead of paste, but you also need to use set variable in place of copy. There's no set variable in either version of your script and I see no way for it to work correctly in either case when the need arises to create a new record.

              • 4. Re: Help with Script
                SteveMartino

                     Thank again Phil, as always for your expert help and advice.  I truly appreciate it. The script does work all the time on one layout but not at all on the other.  I don't know why.  I rarely use the second script, and was just checking it after I changed the first scipt and got that one to work.  It's a mystery to me.  I will try the set variable and see what happens.

                     Regards

                     Steve