We have a hosted layer with some domains.
We use this code: https://support.esri.com/en-us/knowledge-base/how-to-edit-readonly-domains-of-a-hosted-feature-layer... to update the domain.
The client (web application) need to close and restart in order to see the changes.
If we go into the item details (in on-line standard api) and change anything in the domain then the client see it immediately.
It look like the standard screen flag somehow the domain as updated while the code does not.
Anybody have any idea how to do it with code some the client will understand the domain must be reloaded?