function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KeithJKeithJ 

Close case trigger

Hi there. I'm looking at the schema and wondering how a case is closed?

I see a non writeable field called is closed, but I cant see any (intuitive) child relationships from

case to another SObject that sets this value.

Does anyone know?

It's for a trigger I am writing.

Thanks!!

shillyershillyer

The CaseStatus object represents the status of the case, including if it's Closed. You can see the schema here:

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_erd_support.htm

 

Hope that helps,

Sati

KeithJKeithJ

Ah, I forgot to check the ERD.

Thank you very much for your help!

KeithJKeithJ

shillyer, where did you find this information incidently?

Also, one more thing - what field correlates Case and CaseStatus

because in CaseStatus (or Case) I cannot see a relationship...

It's still a little opaque as to how I could set a case to closed with a trigger.

Many thanks

shillyershillyer

Check out the status field.

 

Best,

Sati

KeithJKeithJ

Sorry, I jumped the gun!

I see that each status in a case is a CaseStatus.

Albeit, this CaseStatus is read only via the API.

So I'm wondering how you could set a case to closed with a Trigger if the CaseStatus is read only...

Any ideas? Thanks again