same ID number for Quote and Invoice

I am new to suitecrm and stuck with a problem and need advice.

I am wondering whether it is possible to assign the same identifier for quote and invoice.
For example, once the quote is issued I create an ID number, then when the quote is converted to an Invoice the same ID number is used there.

Is it possible to achieve this somehow with one field? i.e. I create a field in Quote and later use in Invoice and in PDF template.
In case two fields are used, is it possible to have both fields in sync, so when I update the field in Quote, the one in invoice gets updates and vice versa.

thanks in advance

Quick look into this

My first thought I would achieve this through workflows

I think you would need 2 workflows

1 - quote > invoice (Screen shot attached)
2 - Invoice > quote

You may run into a possible hurdle if you have multiple quotes relating to one invoice - when updating your invoice both quotes may update (untested)

Hope this helps

Thanks for the suggestion Taffique.

Not sure that it will work, since the workflow will be executed when you create a Quote, but at this stage the Invoice is not yet created.

I am thinking the better way would be upon creation of invoice to copy the value of a field “quote number” from module “Quote” to a field called “Invoice number” in module “Invoices”
but if I do it via Workflow I can’t get the fields from the Quotes module.

Basically what I need is to automatically copy a value from XXX-field in Quotes to a value YYY-field in Invoices. Is it possible to do?

Just thinking aloud i’m sure this isnt default because you cnahave many quotes but little invoices compared to the quiotes and therefore not having number matches.

Why don you create a relationship in studio and simply relate the quotes to the invoice?

Actually I just checked, there is already a relationship for quotes to invoices. Otherwise you could do a custom hook, and write code to pull the number from quote and change it in the invoice?

I haven’t done a custom hook in ages so I dont remember the steps right off the bat.

Have tried aplying a slightly different logic, as per attached picture, but the Workflow is not activated when the new invoice is created.
Is it possible to have the “Workflow module” set as Quotes, but the activation condition to be from “Invoices: aos_quotes_aos_invoices” ?