Anveo Mobile App / Best Practices / Create New Records

Create New Records

You can create new records using Anveo Script in Action Codes. These Action Codes can be run via menus or buttons. First, define the primary key of your record, then optionally set further values. Finally you can show the new record on lists or cards.

Before using your new record on lists or cards you must define the primary key completely. It is not possible to change primary key values on a card page manually.

The following code example creates a new customer using the mobile number series CUST. It uses function GetNextNo of library LIB_NO_SERIES. Usually a mobile number will be replaced with a final number given by . Please find further details regarding mobile numberseries here.

local NewCustomer = Record('Customer');
Rec:SETVALUE('No.', GetNextNo('CUST'));
Rec:INSERT();
PAGE_OPEN('ASLS_CUSTOMER',NewCustomer,Rec);
Example code that shows how to create a new customer. The record shows up on an Anveo Page afterwards.