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

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

Recommended Posts

  • Newbies
Posted

Hi!

I got a Adress database and want to make a button that opens up my Invoice database and make a new record and put in name, adress... from the Adress database...

Posted

Buttons operate scripts. Therefore you need to write a script which will create a new record in Invoice.To get the address into the Invoice record, you can either include that as part of the script, or as a lookup in relation to some field which is part of the script.

Posted

Hi,

Create a relationship between the two databases on an ID field. When you switch from the Address database to the Invoice database and create a new record on a form which contains the related fields from the Address database. This way the related information is automatically displayed and you don't have to copy any information. This can all be scripted to a button.

Louisa

  • Newbies
Posted

I hope this can help:

There are a couple of things to consider. Do you want the address information to always remain the same on the invoice? In other words, if your customer moves, do you want the previously created invoices to reflect the new information or the original information (usually, you want to know exactly what you did at the time you did it for auditing purposes). To keep the data the same, perform a lookup on each field using some kind of customer number that is unique. A system-generated serial number works great for customers.

For customer and invoicing systems, I always write a script to set a global field (e.g. Global Customer Number) in the customer file to the customer serial number. I run an external script in the invoice file to start a new invoice and set the new invoice customer number equal to the global field data in the customer (Address, in your case) file. A relation is set up in the Invoice file to the unique Customer Serial Number. Setting global fields lets you use the data more easily if you need to process other things from that number. Also, if you copy and paste, the system has a higher risk of a problem.

Example script:

Comment: from the current record.

Set Customer Number Global to Customer Number

Perform External Script: Invoice File: New Invoice

External Script: invoice File:

Set Invoice File: Customer Number to Customer File: Global Customer Number.

This should perform all necessary lookups if your address fields in the Invoice file are set to lookup based on the customer id. With the global field idea you can also make a new invoice, same customer script in the Invoice file, if that ever comes up.

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