Parse Pains: Before Save with Data Browser
Due to the repeated struggles with Parse, I've decided to start blogging my growing pains with the backend-as-a-service product. Before I start, I will say that Parse is great for many things, but customer support, outages, and edge cases are not among them.
For our first struggle, if you have created beforeSave() triggers on custom classes, you may often be dealing with logic that requires a Parse.User.current() or you may be enforcing restrictions that you want to directly override in Parse while being an admin. You'll quickly find that these conditions fail horribly when working directly with the Data Browser.
To ignore beforeSave() triggers when calling from Data Browser, simply add this conditional as the first line of your trigger function:
if (request.master) response.success();
Also, its often useful to only run a beforeSave() if things have changed, in which case you can ignore new objects with the following return at the start of your function.
if (request.object.isNew()) response.success();
BTW, if you are a teenager living in Texas who needs a driver's license, you should check out Aceable for Drivers Ed from your iPhone.

















