0:07
hello everyone in this video we are
0:10
find how to get or fetch the record
0:17
accessible by the running
0:19
user in Salesforce Apex whenever it gets
0:24
executed um it will be running in the
0:27
user who is uh uh execut that Apex code
0:31
via visual force page controller or via
0:34
any lightning component controller or
0:38
flow so we can Define the running user
0:42
there um since it runs in the user mode
0:47
we can make use of is available method
0:56
whether this particular record type is
0:58
accessible for this current running user
1:01
and then we should be able to find out
1:04
object uh I have couple of Rec
1:08
types if I wanted to find whether I have
1:11
access to that uh through my profile for
1:15
example let's go to this account object
1:18
here I have three record
1:38
profile let's go to the system
1:45
profile the system administrator profile
1:49
we have to go to the object
1:53
settings and we have to select the
2:06
Define the record type access I don't
2:10
have access to external but I have
2:12
access to internal and partner as a
2:13
system admin so if I execute this code I
2:19
only internal and partner I should not
2:23
external let's execute the
2:30
so I'm able to get the internal and
2:32
partner Master will come because uh that
2:35
is common if you want to ignore it you
2:37
can add a if condition in the code and
2:40
see whether it is master and ignore it
2:42
I'm getting internal and partner but not
2:44
external because I don't access uh to
2:47
that particular record type in my
2:50
profile so using is available method on
2:53
the record type info we can easily
2:55
filter out uh and get only the record
2:58
types that are access accessible uh for
3:07
user please check the video description
3:10
in the video description I have given my
3:12
blog post from the blog post you should
3:14
be able to get the sample Apex code
3:16
which we referenced in this