Scripted Record Creation Methods

Go To Layout [Invoices], New Record/Request, Go To Layout [original]

True, those are the minimum steps necessary to script the creation of related records - for the situations when a script is used for creation, instead of relying on the user creating the record.

However, the ultimate goal, of any software-based environment, is to code something once, and have it work for multiple situations. This is what this video is all about. It's about the process of scripting the creation of new records - and doing it efficiently.

It showcases this by starting with the very basic methods, then moves on to the most powerful and flexible methods. If you thought you knew everything there is to creating records, then you may want to watch this one. There's likely some tips in this video which you may have missed!

AttachmentSize
ScriptedRecordCreation.zip1.14 MB

Comments

Looking at example 5 for variable record creation....

I have the need to use this method for creating a record with over 100+ fields. Using a button to pass this may parameters to the list is time consuming hand coding. So I am wondering if there is a way while on a given layout based on the current table if I can use a function to capture the field names from the layout to pass to the script parameter list.

In other words, if I have my layout based on a Table A, I want to grab all the field names from table A and pass them to the list with a prefix of $CREATE_

IE:
Field names from Table A
MyField 1
MyFiled 2

automatically create a list from above:
"$CREATE_MyField 1=" & Table A::MyField 1;
"$CREATE_MyField 2=" & Table A::MyField 2;

// passing values from the record we're on

List(
"$CREATE_MyField 1=" & Table A::MyField 1;
"$CREATE_MyField 2=" & Table A::MyField 2;
)