State transition on new record form not working

eyal abu hamad
Mega Sage

Hey, I created new state flow but it seems that it dose not work on new record form. only after I save the record it apply the state flow.
why is that ?

eyalabuhamad_0-1705564213141.png

 

2 ACCEPTED SOLUTIONS

Maik Skoddow
Tera Patron
Tera Patron

Hi @eyal abu hamad 

yes this is correct. A new record has no value, and thus no conditions can be applied. Furthermore, state flows work on the server side and this requires any record operations like saving or updating.

Maik

View solution in original post

Hi,

What you can do is make state field readonly on New Form or hide it completely.

Also you may remove unwanted options by checking g_form.isNewRecord() in onLoad client script.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

7 REPLIES 7

Maik Skoddow
Tera Patron
Tera Patron

Hi @eyal abu hamad 

yes this is correct. A new record has no value, and thus no conditions can be applied. Furthermore, state flows work on the server side and this requires any record operations like saving or updating.

Maik

so should I use a client script that Hide the options that I don't want show at new ?
the g_form.isNewRecord() function and hide options of state ? or there is a better way to hide them

Hi @eyal abu hamad 

it's pretty confusing what you are writing. I'm not even sure whether I got your question initially. Your screenshot is not helping and I'm wondering why you want to replace the existing state flows for the Case table.

Maik

if you may let me clarify my situation. there is couple of state that I want to view only if specific state is the current state. I archived that using the state flow and it works for existing records. but a new record ( before creating the record) it shows all the states. I want to apply the conditions that I have for existing record to work on new record. hope that clarify my situation