Find whether an object supports trigger in Salesforce
2K views
Apr 10, 2025
Show More Show Less
View Video Transcript
0:07
hello everyone in this video we are
0:09
going to see how to check whether we can
0:13
develop a trigger on an
0:16
object using Salesforce
0:19
Apex in each and every object we have a
0:22
property
0:24
called
0:26
triggerable if this triggerable property
0:29
is true
0:31
then we can
0:32
develop Apex Trigger on that object or
0:35
entity if this triggerable property is
0:38
false then Apex Trigger on that
0:41
particular object or entity is not
0:43
supported by
0:45
Salesforce first I'm using map map of
0:49
string comma schema. object type Global
0:53
description is my variable schema. get
0:56
Global describe using this uh Global
0:59
description option I'm getting the
1:01
account object schema. s object
1:06
type using the S object
1:10
type and uh with the help of get
1:12
describe method I'm getting the schema
1:16
do describe as object
1:20
result since I wanted to get the
1:24
triggerable property I'm converting that
1:26
into a Json string using Json do
1:30
serialize using a system. debug
1:33
statement I'm printing the Json
1:36
value using Json parser I'm creating a
1:40
parser for it and so that I can iterate
1:43
it I'm iterating each and every uh token
1:47
that is each and every value and I'm
1:50
checking whether the current token value
1:54
is field name if it is field name and if
1:57
the get text of that particular field
2:00
name is
2:01
triggerable then I'm getting next token
2:05
so that it will go to the properties
2:07
value and then using get Boolean value
2:11
I'm displaying whether it is true or
2:12
false in this case I'm going to test it
2:15
for account
2:28
object account
2:31
object
2:32
um we can definitely create a
2:36
trigger so it should be
2:39
true so triggerable is true uh let's
2:43
take another example where uh trigger is
2:46
not supported for
2:49
example conversation entry object or
2:52
entity in this object we cannot develop
2:55
a trigger so for this particular code
2:58
the triggerable uh
3:00
property should be
3:13
false please check the video description
3:17
in the video description I have shared
3:19
my blog post from the blog post you
3:21
should be able to get the sample Apex
3:23
code which was referenced in this
3:28
video
3:34
I hope it was
3:45
helpful thank you for
3:58
watching
#Business & Productivity Software
#Computer Education
#Internet Software