Develop > Persistence layer


Insert data using access beans

You can access beans to create new data as part of the business logic.

To create new data, use any access bean constructor with one or more arguments. You can then set any additional data on the bean using the provided setters, and call the commitCopyHelper() method.

The following code example creates a new fulfillment center:

//Create a new fullment center record.
FulfillmentCenterAccessBean fcab = new FulfillmentCenterAccessBean(ownerId, fflname); //Set additional data on the access bean.
fcab.setInventoryOperationFlags(flags); //Commit the inventory operation flags update
fcab.commitCopyHelper();

Tip: You do not need to call commitCopyHelper() if you create the record using only the constructor, and do not call additional setters.


Related concepts

Find data using an access bean

Delete data using an access bean

Access beans


+

Search Tips   |   Advanced Search