I have created a custom model which I plan to use to change a custom field attached to the Contacts record. I have created the SuiteScript file, JavaScript file and Service Controller.
I am not too sure how SCA communicates with the server but I assume that you call the frontend model from the View, which then calls the Service Controller which in turn calls the backend model.
I am able to call the frontend model so I think it is set up correctly, the problem I am having is calling the update function on the backend.
The code below is the part of the frontend model that is called.
updateEmbroidery: function updateEmbroidery(newValue, contactId) {
this.set('id', '56');
this.set('value', newValue);
}
The new values show when the model is logged. Trying this.sync also throws an error.