We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Issue with custom components sharing same state

harshitjamw
Tera Contributor

Hi Team,

 

I’m currently working on a custom component that includes a Confirm Deadline field. I’ve noticed an issue where, after selecting a value for the confirm deadline, if multiple records are open in the workspace, the selected value appears in the other records as well. The value is not actually saved in those records, but it is displayed on the client side.

 

It seems like the same state is being shared across multiple records. I’m not sure how to correctly associate the state parameters with each record’s sys_id to prevent this behavior.

 

Has anyone encountered a similar issue before? Any guidance on how to resolve this would be appreciated.

 

Thanks.

3 REPLIES 3

Mark Manders
Giga Patron

If you share your setup/config, that would really help in pinpointing to the issue.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Hi @Mark Manders ,

Thanks for your response.

I am attaching the files related to the component, i have not include the constants and view files as it would not matter i believe.




@Mark Manders 

I have attached the behavior observed in the workspace. Whenever I change the confirmed deadline on a record, it correctly updates the value in the database for that specific record.

However, while the value is not actually being saved for other records, it is still being displayed on them.