Support Topics Documentation Slack YouTube Blog

Inserting via js file

(Tal Seren) #1


I’m trying to insert to a table using this code,
and getting the error ReferenceError: UserAcquisitionRedirects is not defined

var APPLICATION_ID = “YOUR-APP-ID”, SECRET_KEY = “YOUR-SECRET-KEY”, VERSION = “v1”; //default application version; Backendless.initApp( APPLICATION_ID, SECRET_KEY, VERSION ); var userAcquisitionRedirects = new UserAcquisitionRedirects( {
adNetwork: “Archy”,
clickId: 123});
var savedUserAcquisitionRedirects = Backendless.Persistence.of( UserAcquisitionRedirects ).save( userAcquisitionRedirects );

(Mark Piller) #2

Looks like the definition for “UserAcquisitionRedirects” is missing. See the following file in your Files section for an example of how to reference a model class. In there you will see two imported models: Order and ShoppingCart


(Tal Seren) #3

Thanks a lot.

this is working for me now!