Workflow - create a new record with custom ID


I’m trying to create workflow which will create a new record in my custom_module with my custom ID(not auto generated one)

So I created workflow and select action “new record” next I added field “ID” and give test value like ‘wew232-ewe32-rfgfht2-32323’

But when I tested it doesn’t create a new record in needed module. Worflow shown me that something was complete but I can’t find a new record anywhere - in crm module and database too
Also if I just delete mapping “ID” from my workflow that it easyli creating a new record with auto generated ID

workflow was complete

in the screenshot as I understood correctly “ID” means what I need?

unfortunately, it doesn’t work or there is another way to set custom ID?

Try first with no custom ID, let the system do the service. Let us know. When the record is indeed created, then you try to define the custom ID value.

Please, note the ID is a unique value and system will probably fail if this ID had been used already somewhere.

Try to change the record after creation with a fórmula to that field.

BTW, why do you want a custom ID. That’s an internal field CRM uses to keep everything in sync. Here we need a custom opp ID, so we created a field for that wih a workflow doing a calculated field…

ok, then what for we can use this ID field in worlfow?
I need to set custom ID for easily detected created record in the future, for example for another workflow

I doubt that you can play with ID field from the Workflow module. It’s tricky, because it’s the key field, and because it is used in all relationship tables, so you can’t just change it, you have to keep things coherent.

So either use a different field for your purposes like myID, or if you really want to use the ID field, go for a logic hook where you have more control through code.

In this case, create a field with that purpose. If you want to know if a new record is new or no processed, for instance, then you should create a custom field for that, like “new_record” and another “processed”, so another workflow can locate new but unprocessed record, then process them, then mark them as old or processed.

I would not mess with the internal controls of SuiteCRM