0:07
in this video we are going to find
0:12
permission in Salesforce when we have
0:23
APA name of your permission here in this
0:26
code called permissions manage comv
0:30
mining reports with this APA name I
0:34
don't know the label of the
0:38
permission if we wanted to find the
0:41
label of the permission then first we
0:46
have to use schema dot describe as
0:51
declare a variable and use permission
0:54
set entity dot s objective dot get
1:00
so now I will have the information about
1:03
permission set object
1:13
from the describe s object result I will
1:16
be able to get all the
1:21
comma schema Dot s object field so I
1:26
will be able to get those information
1:33
I am going to iterate all that
1:39
I don't want to know about the key my
1:44
main information is in schema.object
1:49
so I am going to get all the values and
1:52
then I'm going to iterate it
1:55
using schema.describe field result
1:59
I am using field dot get describe so
2:03
using from this I will be having all the
2:06
fields and then I'm describing it
2:08
from the field result
2:11
I am checking what is using the get name
2:13
I'm checking whether the name of the
2:16
field is permissions manage con mining
2:19
reports if this is the name
2:22
then it will enter into this debug
2:24
statement sorry it will enter into this
2:26
if Loop and then sorry if
2:32
will be satisfied and then it will go
2:36
statement next it will display a system
2:39
dot debug statement field label is
2:44
fieldresult.getlabel so using this field
2:47
result.getlabel and I will be able to
2:49
find out what is the label of this
2:52
permissions using the APA name
2:59
since it is using a break statement once
3:02
I find the label it will just break the
3:05
far Loop and then it will end the
3:15
so the AP name was very confusing when
3:19
we saw that but the label is
3:22
View and generate Einstein conversation
3:27
so this is a label of the
3:38
piece of code you should be able to find
3:40
out the label of the permission
3:44
when you have the AP name of the
3:46
permission in Salesforce
3:56
please check the video description
3:58
in the video description I have shared
4:01
from the blog post you should be able to
4:04
get the sample code which we referenced
4:16
I hope it was helpful
4:26
thank you for watching