
Runner.pages.PageSettings.addPageEvent( 
	"Supplier", 
	"add", 
	"afterPageReady", 
	function(pageObj, proxy, pageid, inlineRow, inlineObject, row ) {
		// Place event code here.
// Use "Add Action" button to add code snippets.

var supplierNoCtrl = Runner.getControl(
    pageid,
    "reference_number"
);

if (supplierNoCtrl) {
    if (proxy["supplierNumberPreview"]) {
        supplierNoCtrl.setValue(
            proxy["supplierNumberPreview"]
        );
    }

    // Display the generated number but prevent manual editing
    supplierNoCtrl.makeReadonly();
}
});


Runner.pages.PageSettings.addPageEvent( 
	"Supplier", 
	"edit", 
	"afterPageReady", 
	function(pageObj, proxy, pageid, inlineRow, inlineObject, row ) {
		// Place event code here.
// Use "Add Action" button to add code snippets.

var supplierNoCtrl = Runner.getControl(
    pageid,
    "reference_number"
);

if (supplierNoCtrl) {
    supplierNoCtrl.makeReadonly();
}
});







