Parse & Javascript: Insert a record

This entry is part 8 of 25 in the series Parse & Javascript

Say you are an independent filmmaker and you want to keep track of the movies you have made. ┬áLet’s make an App to do that.

<!doctype html>
    <title>My Parse App</title>
    <script type='text/javascript' src=''></script>
    <script type='text/javascript' src=''></script>


    <div style='display:none' class='error'>
        <h1>Failed to connect to Parse database</h1>

    <div style='display:none' class='success'>
        <h1>Successfully inserted a movie record</h1>

    Parse.initialize('5d3sro43zBGj8AMYqWND5bFYMzAan7f5P5euZm7M', 'hlRZZqAylA7Fmah4Kk6ma8WK7QCT4cHrxjafnnkI');
    var MovieObject = Parse.Object.extend('MovieObject');
    var movieObject = new MovieObject();

    movieObject.set('titleName', 'Dallas Buyers Club' );
    movieObject.set('actorName', 'Matthew McConaughey');
    movieObject.set('releaseYear', 2013);, {
        success: function (object) {
        error: function (model, error) {


Try The Code

Once you have ran the above script, you can check in the Data Browser in Parse if the record is correctly inserted.


We take note of the 2 lines below.

Below here the simple syntax to create a new subclass of Parse.Object.

var MovieObject = Parse.Object.extend("MovieObject");

Here, we create a new instance of that class.

var movieObject = new MovieObject();
Series Navigation<< Parse & JS: Parse.Object
Parse & JS: Insert a record using save method >>