Page 1 of 1

Stop loading Script OnTimer Got To Object

PostPosted: Fri Apr 21, 2017 1:03 am
by Regine
Hi John and KC,

I have written a script to do a specific task, but at the end of my script it always calls the script "Go to Object" and it results in an error "Object Name not passed".

My last step in the script is Go to Field in a custom layout with hardly anything on it.

I tried adding Exit Script at the end, but it doesn't help.
How can I stop the execution of this script?

Thanks

Kind regards

Regine

Re: Stop loading Script OnTimer Got To Object

PostPosted: Fri Apr 21, 2017 8:23 am
by tanner
Hi Regine,
The "Go To Object" script is generally only called as a subscript to "Call Go To Object" when navigating a slide panel. For example when entering or exiting a contact selection. That script should not be executing from a custom script on a custom layout unless you are calling a subscript that invokes it. It might be helpful if you could take a screenshot of your script steps and we could take a look.

The "Call Go To Object" script does call the "Go To Object" script on a short half second onTimer so that might be what you are seeing.

Thanks,
Tanner

Re: Stop loading Script OnTimer Got To Object

PostPosted: Fri Apr 21, 2017 8:23 am
by tanner
Hi Regine,
The "Go To Object" script is generally only called as a subscript to "Call Go To Object" when navigating a slide panel. For example when entering or exiting a contact selection. That script should not be executing from a custom script on a custom layout unless you are calling a subscript that invokes it. It might be helpful if you could take a screenshot of your script steps and we could take a look.

The "Call Go To Object" script does call the "Go To Object" script on a short half second onTimer so that might be what you are seeing.

Thanks,
Tanner

Re: Stop loading Script OnTimer Got To Object

PostPosted: Mon Apr 24, 2017 1:07 am
by Regine
Hi Tanner,

Thanks for your message.

Attached a copy of the script (part 1) and my layout.

The "Go to Object" script fires right at the end after the last step "Exit Script" on my script part 1.

Actually I just noted, that almost every button in my Contacts layout seems to call automatically the Script "(Button) Contact" after the script attached to the button. (see screenshot debug)
I can't work out where this is coming from, but looks like this is what causes the issue.

I tried also to "Exit current Script" when assigning the script to the button.

What I am doing:
I find a set of records I want to email to.
I then check on the number of records and go back to the first record.
Then I create a new record in the Notes section and pre fill it (new layout).
Script Part 1 is finished and I get the error message.

Part 2 of the script (not included as attachment):
After I press continue, it creates an email in Outlook and an entry in the notes section to each individual contact record that was found in part 1.

I noted, that it does call a lot of other scripts just by moving between records and performing the find. If you have any tips on improving my script, I would be very happy to hear.

Thanks

kind regards

Regine

Re: Stop loading Script OnTimer Got To Object

PostPosted: Mon Apr 24, 2017 10:57 am
by kcembrey
Hi Regine,

Thanks for the additional info.

Most likely the reason the "Go To Object" script is being performed right after your script finishes or exits is that the On Timer script has already been created with "Call Go To Object" before your script was performed. Since the time hadn't elapsed before your script was called, the "Go To Object" waits until your script is finished, then it is performed.

It would be helpful to get a copy of your latest file so we can dig into this a bit further. I'll be reaching out to you via our case system.

Thanks,

KC