-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOLK-2836 Skill Sync #733
TOLK-2836 Skill Sync #733
Conversation
Domain and Subdomain fields for ServiceResource
permsetGroup and publicGroups Callout interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Likte veldig godt Test.loadData(),. Den kan vi få bruk for på andre områder og.
Noen kommentarer:
- Her kan du vel fjerne "this" prefix stort sett overalt bortsett fra i konstruktøren, så blir det litt ryddigere 😄
- Jeg tenker at getterne kunne egentlig bare vært initialisert i en init() som kalles i konstruktøren nå, men getter funker greit det og!
- Vi må oppdatere domain på våre ServiceResources som du sier. Det kan kanskje du gjøre for oss ettersom du har tilgang til det?
private Map<Id, User> userMap { | ||
get { | ||
if (nksUserMap == null) { | ||
nksUserMap = new Map<Id, User>(); | ||
for (User usr : [ | ||
SELECT Id, Name | ||
FROM User | ||
WHERE | ||
Id IN ( | ||
SELECT AssigneeId | ||
FROM PermissionSetAssignment | ||
WHERE PermissionSetGroup.DeveloperName = 'Kontaktsenter' | ||
) | ||
if (userMap == null) { | ||
List<User> userList = new List<User>(); | ||
for (PermissionSetAssignment psa : [ | ||
SELECT Assignee.Id, Assignee.Name, PermissionSetGroup.DeveloperName | ||
FROM PermissionSetAssignment | ||
WHERE PermissionSetGroup.DeveloperName = :this.permsetGroupName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kan ikke dette gjøres direkte om til en map så slipper vi listen?
userMap = new Map<Id, User>([SELECT Id, Name FROM User WHERE Id IN (SELECT AssigneeId osv osv ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok!
|
Fix: skill deletion for other than NKS ServiceResources.
Update: set Domain field on ServiceResource creation
Update: check skills only for ServiceResource on given Domain
Added: customization of Domain, Subdomain, PermissionSetGroup, Fotrolig group and Skjermede group for possible sync for other services
Added: Callable interface to make call from independent packages(hot-servicetjenesten)
!IMPORTANT! relevant ServiceResourse´s should be updated to have correct domain. Looks like NKS missing some.
Something like:
List<ServiceResource> srToUpdate = new List>serviceResource>(); for(ServiceResource sr : [SELECT Id, ResourceType, IsActive, CRM_Domain__c, RelatedRecordId, RelatedRecord.Profile.Name, CreatedBy.Name, CreatedDate, LastModifiedDate FROM ServiceResource WHERE RelatedRecordId IN (SELECT AssigneeId FROM PermissionSetAssignment WHERE PermissionSetGroup.DeveloperName = 'Kontaktsenter')]){ sr.CRM_Domain__c = 'NKS'; srToUpdate.add(sr); } update srToUpdate