Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

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 

Posted

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

Posted

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.

Posted

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?

Posted

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.

  • Like 1
Posted

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

This topic is 3013 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.