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

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

Recommended Posts

Posted

I am trying to write a script to save an Invoice pdf.

Manually the steps are:

Step 1: Go to Layout xyz

- xyz layout is a list layout, based on a Lines Table.

on layout xyz there is a find script that selects all lines related to an InvoiceID.

Step 2: Set field g_Find_InvoiceID

- this is a drop down value list based on a field, c_Find_InvoiceID that finds all Invoice ID

Step 3: Run script

This script is:

Enter Find

Set Field:(INVOICES:: kp_InvoiceID; LINES::g_Find Lines_InvoiceID)

Perform Find

Step 4:

I save as pdf

Is it possible to automate these steps from the Invoices layout where the g_Find InvoiceID is automatically set to current value of kp_InvoiceID on the Invoices layout?

I am using the Lines layout to produce an Invoice ID because it allows me to create a continuous Invoice using the Invoice portal data that page breaks appropriately.

Thanks

Matthew

Posted

I resolved this problem by placing the g_Find Lines InvoiceID field on the Invoice layout and then Set Field g_Find Lines InvoicesID; kp_InvoicesID. Then the rest of the script. It worked. Maybe someone knows a way without needing to place a redundant field on the Invoices layout

Posted

I am not sure why a global. It seems to me that it is just acting as a venue for a calculation result. If you look at the post '

Calculation - find fields results by month' Ms LaRetta shows one how to create a Find engine. It is a very handy technique. I have attached my solution script.

post-104472-0-17657600-1337904302_thumb.

Posted

This technique uses the global field to capture search criteria and then scripts the find.

My questions for your situation are:

1. Where is the user when he wants to email an invoice? Isn't he in the Invoice table? Why would he be in the Invoice Line Items table?

2. So, couldn't you have them navigate or find in Invoices and then simply click a button on the invoice to send it as a PDF (like in my demo).

The global technique is nice, but only if the user knows the Invoice ID. What if they don't? Giving the user a FIND layout based on the Invoice table would let them search invoices using any field. Such as the Invoice's Customer, Date, ID and any line item.

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