Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

New Window then Go To Layout will not Go To Layout

Featured Replies

I have a Payments List View layout that can be opened from any layout using:

New Window . . .
Go to Layout . . .

Except this one other List View layout. It just ends up as a new window of the same layout.

New Window . . .
Go to Layout . . . will not open any other layout.

Driving me nuts. What causes this?

FM15 Advanced

Print your script to Text and paste it here.

  • Author

This is the new window script that works on all layouts except the Orders List layout:

Sales Orders Scripts: Sales Orders Payments: PP - Goto Payments Layout 

New Window [ Style: Document; Name: "Paypal Payments IPN"; Top: 0; Left: 300; Close: Yes; Minimize: Yes; Maximize: Yes; Zoom Control Area: Yes; Resize: Yes ] 

Go to Layout [ “Paypal Payments” (paypal_ipn_orders) ]

 

This script trigger runs on layout enter:

Sales Orders Scripts: Sales Orders Payments: PP - Open List - Adjust Window Resize to Fit Show ... 

Allow User Abort [ On

Show All Records 

Enter Find Mode [ ] 

Insert Calculated Result [ paypal_ipn_orders::creation_timestamp; " > " & Get ( CurrentDate ) - 7 ] [ Select

Perform Find [ ] 

Sort Records [ Keep records in sorted order; Specified Sort Order: Payments Status::MAP Status; descending paypal_ipn_orders::id; descending ]
[
Restore; No dialog

Scroll Window 

[ Home ] Adjust Window 

[ Resize to Fit

Move/Resize Window [ Current Window; Height: 1100

Show/Hide Toolbars 

[ Hide ] Halt Script

 

The Orders List layout also has a script trigger on layout enter:

Online Orders Scripts: OO - Open List - Adjust Window Resize to Fit Show All Records Sort Copy

Enter Find Mode [ ]
Insert Calculated Result [ rtd_orders::insert_date; " > " & Get ( CurrentDate ) - 6 ]

[ Select ] Perform Find [ ]

Sort Records [ Keep records in sorted order; Specified Sort Order: rtd_orders::order_id; descending ] [ Restore; No dialog ]

Adjust Window

[ Resize to Fit ]

Move/Resize Window [ Current Window; Height: 1100 ]

Show/Hide Toolbars

[ Hide ] Scroll Window

[ Home ] Halt Script 

Hi cos,

Have you performed this find manually?

Have you ran the script using Script Debugger and Data Viewer?

The Show All Records is an unnecessary step, a Find looks at all records.

Use Set Field script step,  instead of Insert Calculated Result. The Insert Step requires the field to be on the current layout.

I would disable all of the unnecessary steps (i.e. window sizing, user abort, etc.) until the script performs as desired.

Lee

  • Author

I have run the Script Debugger multiple times comparing successful page and unsuccessful. It fails at line 2 of the first script. It opens the wrong layout. I can't get past that. But, I did not use the Data Viewer (doh). It is returning unusual data at line 2 which the other layouts are not. 

Name: rtd_orders::insert_date
Value: 8/18/2016
Type: Date

That's an old date.

Making your suggested changes (which i did, thanks) doesn't matter because it never gets to that script because the first script opens the wrong layout.

Sales Orders Scripts: Sales Orders Payments: PP - Goto Payments Layout 

New Window [ Style: Document; Name: "Paypal Payments IPN"; Top: 0; Left: 300; Close: Yes; Minimize: Yes; Maximize: Yes; Zoom Control Area: Yes; Resize: Yes ] 

set variable $e1 = get last error

Go to Layout [ “Paypal Payments” (paypal_ipn_orders) ]

set variable $e2 = get last error

Exit Script

 

 

Step thru this one line at a time. What are the contents of $e1 and $e2?

When you make a new window, the current layout is reloaded and the OnLayoutEnter script trigger fires. The Orders List layout's triggered script ends in Halt Script[]. The Halt Script[] script step ends all running scripts, such as the new window script, so you never get to the Go to Layout[].

Use Exit Script[] in place of Halt Script[] in the Order List OnLayoutEnter triggered script.

  • Author

Thanks to all. David's solution is correct. Man, how easy it is to miss the small things.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.