1

Does anyone know of a reference for the database values of the SandboxProcess.Status field in the Tooling API?

I want to query SandboxProcess, but filter out the Deleted and Deleting records in the query. I couldn't get my filter on Status to return any records, though. I read this known issue:

https://issues.salesforce.com/issue/a028c00000qQ0xfAAC/tooling-api-query-on-sandboxprocess-does-not-return-records-if-we-use-the-status-field-as-a-filter

The issue says that:

Tooling API query on SandboxProcess returns no rows if we use the status field as a filter.

If we use, Status='Deleted' it does not return any records.

The workaround is:

If we used DB values, not API or translated values, expected rows are returned.

select id, status, sandboxname from sandboxprocess where Status='D'

That's fine, but I don't know what the DB values corresponding to the API values are. And I haven't been able to find it anywhere in poking at my org or by Googling. Obviously, I know that D=Deleted, but it would be useful to have a complete list of them.

1 Answer 1

4

Here is what I found from the internal codebase.

PENDING("0", "PENDING"),

FINISHED("1", "FINISHED"),

PROCESSING("2", "PROCESSING"),

FAILED("3", "FAILED"),

ACTIVATION_PENDING_CONFIRM("4", "ACTIVATION_PENDING_CONFIRM"),

ACTIVATION_CONFIRMED("5", "ACTIVATION_CONFIRMED"),

DEACTIVATION_CONFIRMED("6", "DEACTIVATION_CONFIRMED"),

DEACTIVATION_FINISHED("7", "DEACTIVATION_FINISHED"),

ACTIVATION_PROCESSING("8", "ACTIVATION_PROCESSING"),

SUSPENDED("S", "SUSPENDED"),

OK("A", "OK"),

NOT_ENABLED("B", "NOT_ENABLED"),

ALREADY_RUN("C", "ALREADY_RUN"),

DELETED("D", "DELETED"),

PENDING_DELETE("E", "PENDING_DELETE"),

PENDING_DISCARD("F", "PENDING_DISCARD"),

STOPPED("G", "STOPPED"),

PENDING_ORG_STATUS_UPDATE("H", "PENDING_ORG_STATUS_UPDATE"),

SET_TO_NULL("I", "SET_TO_NULL"),

NO_CHANGE("J", "NO_CHANGE"),

PENDING_RESET("K", "PENDING_RESET"),

PENDING_DELETE_PARTIAL("L", "PENDING_DELETE_PARTIAL"),

SAMPLING("X", "SAMPLING"),

PENDING_SAMPLING("Y", "PENDING_SAMPLING"),

PENDING_REMOTE("M", "PENDING_REMOTE"),

REMOTE_CREATED("N", "REMOTE_CREATED")

I suggest log a case so this can be fixed or at-least docs can be improved.

1
  • 3
    Thank you so much, Mohith! I submitted feedback from the documentation page itself requesting that they add this extra information.
    – Aidan
    Commented Sep 5, 2023 at 12:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .