You need to sign in to do that
Don't have an account?
Pat Harris 8
I'm trying to get the date in a SOQL query but contine to get an error...
I'm trying to get the date in a SOQL query but contine to get an error...
I'm not a developer btw. Here is the query:
"Select Assignee.Id, Assignee.Name, PermissionSetLicense.MasterLabel
From PermissionSetLicenseAssign
Where PermissionSetLicense.MasterLabel in ('Salesforce CPQ License')"
I'm not a developer btw. Here is the query:
"Select Assignee.Id, Assignee.Name, PermissionSetLicense.MasterLabel
From PermissionSetLicenseAssign
Where PermissionSetLicense.MasterLabel in ('Salesforce CPQ License')"
If i am correct you can use the CreatedDate field of PermissionSetLicenseAssign record which will help you to found the date when CPQ license was assigned. At the time of license assignment only the PermissionSetLicenseAssign record will be created so you can use the CreatedDate field as assigned date.
Thanks,
Maharajan.C
All Answers
Hi Harris,
Please find the solution.
Admins are welcome to copy and paste the following SOQL queries into the Developer Console to view a list of PSL assignments for each package:
Salesforce CPQ
select Assignee.Id, Assignee.Name, PermissionSetLicense.MasterLabel from PermissionSetLicenseAssign
Where PermissionSetLicense.MasterLabel in ('Salesforce CPQ License')
Advanced Approvals
select Assignee.Id, Assignee.Name, PermissionSetLicense.MasterLabel from PermissionSetLicenseAssign
Where PermissionSetLicense.MasterLabel in ('Salesforce CPQ AA License')
OR
Please follow the steps mentioned below :
Go to the Developer Console
To open the Developer Console from Salesforce Classic:
1. Click Your Name.
2. Click Developer Console.
To open the Developer Console from Lightning Experience:
1. Click the Setup gear icon.
2. Click Developer Console.
Click on the Query Editor tab towards the bottom left
Copy and paste the following query in the Developer Console:
"SELECT Name, Id FROM User WHERE Id IN (SELECT AssigneeId FROM PermissionSetLicenseAssign WHERE PermissionSetLicense.MasterLabel ='NAME OF THE PERMISSION SET LICENSE') AND IsActive=true ORDER BY Name"
Click on Execute.
This will display a list of every ACTIVE user along with their internal Id, who have that license. If you would want to view the assigned license(s) of INACTIVE users, you would need to replace the "IsActive=true" with "IsActive=false"
Note: If you are not sure about the name of the licenses, please get the name from under permission set license assigned from company information.
If your query is solved then don't forget to mark it as the Best Answer.
Thank You
I want to see the date that CPQ license was assigned. looking for what I would use to get that; tried "Assignee.Date" and "Date.Assignee', neither worked, got an error for both. Does anyone know the synntax to get the date assigned?
PermissionSetLicenseAssign | SOAP API Developer Guide | Salesforce Developers (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_permissionsetlicenseassign.htm)
I would do some tests to confirm, but use Created Date
regards
Andrew
If i am correct you can use the CreatedDate field of PermissionSetLicenseAssign record which will help you to found the date when CPQ license was assigned. At the time of license assignment only the PermissionSetLicenseAssign record will be created so you can use the CreatedDate field as assigned date.
Thanks,
Maharajan.C
Thanks for the responding and the screenshot. It worked.