Xero Job Status

Rather annoyingly, the job status is just about the only individual field in Xero Practice Manager where you have a single field 'form' that doesn't update automatically. This makes it really easy to change the value and then forget to press the sibmit button as all the other single fields update automatically and only the multiple field forms need to be submitted.

A proper solution to this would be to get Xero to fix this so that it updates automatically on change the way all the other separate fields do but failing that we can make use of a userscript to click the submit button for us (note that I first tried having the change submit the current form but that didn't work - whereas having the change despatch a click event to the submit button does work.

To install this on Chrome and similar browsers you need the TamperMonkey extension. For Firefox you'd use GreaseMonkey. First make sure the extension is installed and then add the following userscript to it.

// ==UserScript==
// @name Xero Status
// @namespace http://tampermonkey.net/
// @version 0.1
// @description SUbmit when status us changed
// @author You
// @match https://my.workflowmax.com/job/*
// @grant none
// ==/UserScript==
 
(function() {
'use strict';
var state = document.getElementById('ctl00_ctlxlayoutState');
var event = new Event('click');
state.addEventListener('change', function() {document.getElementById('ctl00_btn0').dispatchEvent(event);}, false);
}());

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate