When using a multi-company setup, the default company is defined in the global settings, e.g.:
I would assume when this is set, it would also apply to newly created records such as Journal Entry or Sales Invoice (and many more). However, even with this set, it will always use the first created company as default for new records.
My proposal is that the default company should be used for newly created records as default company. I know there are also proposals around for a user-specific default, which I also agree to.
What is the status on this? Would a pull-request be appropriate? Any workarounds (unfortunately setting the default value of the company field in the customisation does not work)?
Can you check if there exist any User Permission on Company for your ERPNext account? If user permission is found for the company, it will be given priority over default company defined in the Global Defaults.
thank you for your input. The useres have access to all companies, but most documents are for the company that was created second. I have tried to add an additional, explicit user permission for company B but it did not change anything that the first created company is the default…
I think a better workflow might be to change the docfields named “company” in the system to have the “remember last value” option. So you’re working in Company A for some number of transactions and then switch to Company B and it remembers that it’s company B until you change it again.
You can customize this now, but I’d be advocating for this as the default behaviors (as opposed to regularly changing a global or user default).
Edit: the memory is per-doctype, not global, so it may be a less-good solution that way.
Maybe I see this wrong, but “Track changes” on DocType “Company” means that the system will keep track of the changes of a record (history).
“Remember last selected value” on the attribute “company” in e.g. DocType “Sales Invoice” would subjectively try to remember the last value. Which would resolve the initial issue, and I can confirm the function is there in v10 (very odly translated )… will give this a try… thanks for sharing!