Option to Lock the Reference field

I request that Manager be given the option to completely lock the referencing field.

When the lock is turned on, users (restricted or unrestricted) shouldn’t be able to uncheck the button below when entering or editing transactions, the field should be greyed out.


To change a reference number is to delete an old transaction and generate a new one. Reference numbers when generated should be etched in stone and should not be in the control of users not even users with full access just like how no one has control over the time in timestamps.

A button to set the Reference Field as Locked or Unlocked can be added to settings.

When set to Locked: The Referencing system is locked to automatically generate reference numbers based on a predefined numbering system and users should not be able to enter text in the reference field or make changes to already generated reference numbers even if they have the permission to update transactions.

When set to Unlocked: As it works now.

Why is this feature necessary?

History would be more reliable as ALL transactions captured would initially be assigned with reference numbers making tracking of changes made to a particular transaction much easier. Currently, transactions can be entered without references and transaction references can be edited by users who have permission to edit.

Reference numbers are identifiers and once generated may have been used for tax returns, claims or used as a proof of a receivable by entities who are parties to the financial transaction. If you change a reference number, you have in effect deleted a transaction. I believe a reversal entry is more appropriate in accounting when there is a need to correct an earlier mistake.

Avoid duplicate reference numbers. With a system like that, duplicate reference numbers will never happen.


Just to revive this topic. This is a terrific idea, and should be expanded to all other fields.

Every field in form defaults should have it’s own lock button and any locked field can only be edited from form defaults.


I can not say more words to describe our needs for this implementation :rose:

1 Like

I fully support this, I actually think that such locking could be part of form defaults and when locked the field is not even necessary to display while the numbers will show on the view screen.

In addition it should do so for multiple related forms at a time as the handy copy to fields need to inherit them. Similarly there will be an issue that you can no longer use clone except if it would generate a new reference number but then one can as well ditch the clone button as the copy to is more powerful.


Cloning already creates a new reference number if your form default is set to automatic references.

There are also distinct, deliberate differences between clones and copies as part of the “dumb clones, smart copies” philosophy announced a few months ago. Having both features gives you more options.

For all who are interested, I can make an extension that locks the refference number, if the button is not ‘Create’.

1 Like

I’m very interested to see your lock extension.


Here it is:

Obviously I can lock the text area also. It requires a bit more work.

1 Like

Great work. Can you share your extension with us here?

make new extension
put this code inside it

var overall = document.querySelector(’ input[type=“checkbox”]');
var ingredients = document.querySelectorAll(‘ul input’);

overall.addEventListener(‘click’, function(e) {

for(var i = 0; i < ingredients.length; i++) {
ingredients[i].addEventListener(‘click’, updateDisplay);

function updateDisplay() {
var checkedCount = 0;
for(var i = 0; i < ingredients.length; i++) {
if(ingredients[i].checked) {

if(checkedCount === 0) {
  overall.checked = false;
  overall.indeterminate = false;
} else if(checkedCount === ingredients.length) {
  overall.checked = true;
  overall.indeterminate = false;
} else {
  overall.checked = false;
  overall.indeterminate = true;


at location /custom

also for credit note

1 Like

Didn’t work for sales invoice

Here you are:

test.manager (32 KB)


Thanks :+1:

Brilliant, Thanks @AntonisV
Could you lock the Issue Date also please?

Good job. Thanks. Although reference is with 1 r :wink:

Here it is:

Date & Reference Locked.manager (32 KB)

1 Like

Sorry, But it is not working with Issue Date, I can change dates

You are right. Here is another version witch deletes the date picker alltogether, and uses today’s date.

removed DatePicker & Disabled Reference.manager (32 KB)


Hi. I have a rather amateurish question. How do I enable Extensions tab in settings? Thanks.