Not Editable if created programmatically and editable if created via admin interface

Hey guys I want to implement the following behavior:
If an object of Class A is created programmatically I want its fields to not be editable via admin interface.
If an object of Class A is created via admin interface its fields should be editable via admin interface.

Is this possible?

Use 2 custom layouts and assign each layout depending on how the object was created.

1 Like

Nice solution, you mean using this right? https://pimcore.com/docs/5.x/Development_Documentation/Best_Practice/Showing_Custom_Layouts_based_on_Object_Data.html

Yes, this is what I meant!