• TedXYZ7
  • NEWBIE
  • 135 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 5
    Likes Received
  • 1
    Likes Given
  • 47
    Questions
  • 37
    Replies
Hello Stars!

I need to know the followign information for each User in Salesforce Org.:
  1. what Public Groups are related to each User;
  2. what Permission Sets are related to each User;
  3. what Teams are related to each User;
  4. what Territorries are related to each User;
Beware: there are 4000+ Users so I cannot check this on a User-by-User basis; instead I am looking for an SOQL query to be executed with 'Salesforce Inspector', the 'Dev Console' or 'SF Workbench' or with standard Reports based on a custom Report type?).

The reason I need this information is to, eventually, more easily review all the Sharing Rules (identifying each sharing rule by Ctrl+F searching specific Public Groups) so as to ultimately understand what users are accessing records (because of sharing rules sharing with Public groups) that they should not (historically, security settings has deteriorated and access to data has become a party that I need to remediate).

Could you possibly help witht he above SOQL sentences?

Thank you very much.
Hello Stars!

I am facing an integration between Workday HCM and Salesforce.com.

Here are the Use Cases for the integrations required by Client:
a) when an Employee leaves the company, Workday should trigger a process sending information to Salesforce so as to de-activate the Salesforce User and stop paying for its Salesforce license; (we can start with a semi-automated/manual process).

b) when a new Candidate is "on-boarding" the company, i.e. a new Employee is created into Workday, this system should trigger a process to send information to Salesforce in order to create a User in Salesforce and possibly create a Case (to end setting up the new User).

Question:
1) Do you know if Workday has/offers a "Out-of-the-box" connector that would facilitate the solution?

2) If no connector available, which Solutio design would you recommend?

3) What LoE (Level of Effort) would you estimate for each of the above mentioned Use Cases?

Thank you very much.
Hi,
I need to know why is a Account record visible by a User.
I usually leverage the standard "Sharing" button provided by Salesforce Classic.
But, my client has a Visualforce page associated with Account instead of Page Layout, so I cannot use this "Sharing" button.
Also, when going to Lightning, the button is not available in Lightning yet.

When I SOQL query the AccountShare obj. and query the columns Account.Name, AccountAccessLevel, RowCause, UserOrGroup.Name, the information returned by this query is "system context", not "User Context" which is what I really need.

What alternative solution can you think of?

Thank you
My Client is requesting to find out the number of users actually using MapAnything.

Do you know how to find this out?

Thank you.
Do you know of any good tool to compare Profiles and Permission sets amongst themselves so as to clean and optimise an org with far too many Profiles & Permission sets?

Ideally, I am thinking of a tool that would flesh out the permissions of each Profile & Perm set and facilitate comparison.

Thank you.
Could you please let me/us know what Laptop/Operating System would you prefer working with or recommend (for a Salesforce Developer working with Apex, VF and Lightning -- and SFDX on VSC):
  • Windows?
  • Mac?
Why? (Please, with your answer, let me know why)

(I am looking for getting a brand new Laptop during 1st Quarter thank you 2020).

Thank you very much.

Kind regards.
Is there a way, with Apex, to deliver the folowing requirement:

When Now() falls withing 45 days before a deadline DateTime on the Account, then in such scenario:

First: verify if this Account already has a Case with criteria xyz; if such Case record already exist, update it;

Second: if no such Case exists, then create a Case with attributes xyz.

 
Our Client sells Insurance Policies packages to Business Accounts but the real beneficiaries of those policies are the employees of such Business Account.

Our Client needs to manage data related to both:
- the Business Account (with which they negociate the Opportunity);
- the Person Accounts, i.e. the beneficiaries of each insurance policy (Employees of the Business Account).

I am considering using both, Salesforce Business Accounts AND Salesforce Person Accounts (Person Accounts would be the Children of Business Accounts).

Have you come accross a similar scenario  where you are selling to a Group of Person Accounts and did you levarage Salesforce Person Account functionality?

Can you foresee issues in setting a MD or Lookup relationship from the Person Account to the Business Account?

Opportunities will be created as children of the Business Account.

Could you possibly raise the foreseeable risks of such hierarchical relationship between Parent Business Acc and children Person Accounts?

Thank you very much.

 
A trigger on the following objects won't detect the deletion of a File (not Attachment but... an attached "File") when the deletion is performed by a user from Salesforce Service Console.

The triggers I have been testing with System.debug() were done on the following objects:
  • ContentDocument
  • ContentDocumentLink
  • ContentVersion
I have searched with Google a way to detect when a user is deleting a file from the Service Console (so as to consequently edit a bolean field on the parent object) but I cannot find anything.

I have found this Salesforce article which specify which object we should trigger on in order to detect the deletion bu this article does not mention the Service Console.

Based on my empirical tests, it has become obvious that Service Console does not have the same behaviour as Salesforce Classic when deleting a File from an sobject such as Case.
 
Hi Stars,

I am trying to implement an apex trigger the detects if a File is deleted (so as to, in another apex class, verify if the Parent Object Case has any remaining children Files attached to it or not and consequently edit a boolean field on Case).

I got the solution to work smoothly when the File is added (trigger.isInsert) but that trigger does not work when having to spot/detect when a file is deleted.

I am doing manual tests with Classic.

Salesforce's article (https://help.salesforce.com/articleView?id=000312746&type=1&mode=1) states that, for a trigger to be able to detect when a File is deleted from Classic, the trigger must be on the object ContentDocumentLink (not ContentDocument).

However,  in spite of the above statement on Salesforce's article, when manually deleting a File (attached to a Case) from the Service Console, the trigger on ContentDocumentLink is not being triggered (I can see that with a System.debut method).

Here is my code:
 
trigger ContentDocumentLinkTrigger on ContentDocumentLink (after insert, after delete) {
    System.debug('FROM ContentDocumentLinkTrigger: Entered the trigger');
    Set<Id> ContentDocumentLinkIds = new Set<Id>();
    Set<Id> parentCasesIds = new Set<Id>();
    
    //---> INSERTING FILE
    if(trigger.isInsert || trigger.isUndelete){
        System.debug('FROM ContentDocumentLinkTrigger - triggerNew if isINSERT or isUNDELETE');
        if(trigger.isAfter){
            System.debug('FROM ContentDocumentLinkTrigger - triggerNew if isAFTER');
            for(ContentDocumentLink cdl : trigger.new){
                ContentDocumentLinkIds.add(cdl.Id);
            }
        }
        CaseChildren.retrieveCaseFromContentDocumentLinkTrue(ContentDocumentLinkIds);
    }
    
    //---> DELETING FILE
    if(trigger.isDelete){
        System.debug('FROM ContentDocumentTrigger - Entered isDelete');
        if(trigger.isAfter){
            System.debug('FROM ContentDocumentTrigger - Entered isAfter');
        }
    }
}
Could you possibly help me find out WHY is this trigger not triggering when deleting a File (associated to a Parent Case) from the Service Console in Classic?

Thank you very much.
The System.AssertEqual (); is not returning a PASS in my Apex Test Class.
This is because, the field EmailMessage.HasAttachment (standard field) is not being updated to True by Salesforce (this is a protected Read-Only field of Salesforce).

Here is my apex test class:
@isTest static void insertingEmailMssgWithAttachment() {
        Case c = new Case();
        c.Subject = 'Caso de ejemplo';
        c.Status = 'New';
        c.Origin = 'Phone';
        c.Hidden_Has_Attachment__c = FALSE;
        insert c;
        
        EmailMessage e = new EmailMessage();
        e.Subject = 'Email de ejemplo';
        e.ParentId = c.Id;
        insert e;
        
        Attachment a = new Attachment();
        a.Name = 'Adjunto de ejemplo';
        a.ParentId = e.Id;
        Blob b = blob.valueOf('test');
        a.Body = b;
        insert a;
        
        EmailMessage myEmailMssg = [SELECT Id, HasAttachment FROM EmailMessage];
        System.debug('FROM Test Class HasAttachmentCaseEmail_Test - Display myEmailMssg: '+myEmailMssg);
        System.assertEquals(True, myEmailMssg.HasAttachment, 'Error mssg: The outcome should be True but its not');
        
        Case myCase = [SELECT Id, Hidden_Has_Attachment__c FROM Case];
        System.assertEquals(True, myCase.Hidden_Has_Attachment__c, 'Error mssg: The HiddenHasAttachment field should be True but its not');
    }

The following apex trigger contains an if condition:
if(em.HasAttachment == TRUE) {...code...}

and unfortunately, when running the test class, it is not running the code depending on that if condition.
 
Set<Id> emailIds        = new Set<Id>();
.....

        //==> Verify if EmailMessage has a child Attachment & if its parentId is of Type Case
        for (EmailMessage em : trigger.new){
            System.debug('FROM: EmailMessageTrigger - 2ondtrigerNew: '+trigger.new);
            if(em.ParentId.getSobjectType() == Case.SobjectType) {
                System.debug('FROM: EmailMessageTrigger - ParentId is SobjectType = True?-->Yes!');
                if(em.HasAttachment == TRUE){
                    System.debug('FROM: EmailMessageTrigger - Email HasAttachment field = TRUE? --> Yes!');
                    emailIds.add(em.Id); 
                }
            }
        }
          System.debug('FROM: EmailMessageTrigger - set of all inserted/updated emails: '+emailIds);
When doing manual tests of this functionality (adding an Attachment to the EmailMessage attached to a Case), such manual test works correctly (it passes OK).

Can you possibly help?

Thank you very much.
 
Hello,

As part of a test method, I need to create an EmailMesage (on a Case) with some Attachments.

When I performing a manual test on the UI, the functionality works fine, i.e. I simply go to a Case record and from the "Emails" Related List, I add an EmailMessage with an Attachment. During such manual process, these are the steps:
1) Adding a new Email on the Emails Related List of the Case;
2) Populate some required fields (Subject)on the email form the "To" field;
3) click the button "Attach File" > click button "Choose File" > Click button "Attach To Email" > Click button "Done".
(the Attachment is now attached to the email, even BEFORE sending that email (I guess the email record with its attachment are in a caché until the email is actually sent;
Surpringly, the EmailMessage has its standard checkbox "HasAttachment" = TRUE, even before commintting the EmailMessage record to the database.
4)  Clic button "Send" (on Email Message).

This manuall process triggers the population of a custom checkbox field "Hidden_Has_Attachment__c" on the Case object.

The problem is when coding the Apex TEST CLASS:

On the Test Class, I create the List of Cases, then the List of EmailMessages and finaly a List of Attachments.

The Attachment is associated to its parent EmailMessage through its field ParentId.

I need to create, in the Test Class, the EmailMessages WITH Attachments. How can I do this?

The TEST CLASS creates records in the following sequence:
1) Creates Case;
2) Creates EmailMessages (without Attachment)
3) Creates Attachments

The problem is: I cannot create EmailMessages WITH Attachments and insert these EmailMessages with Attachments so as to get the trigger to trigger (which would help the apex test class to pass).
The test method in the test class needs to insert EmailMessages that will enter the following if statement:
for (EmailMessage em : trigger.new){
      if (em.HasAttachment == TRUE &&
          em.ParentId.getSobjectType() == Case.SobjectType){
               emailIds.add(em.Id);
               }

When the test is done manually on the Salesforce classic UI, the Email Messages enters the if statement but when the apex test method runs, the EmailMessage is NOT entering the if statement because em.HasAttachment is NOT true.



 
Hello,

On line 65, how can I set the value of the custom field Has_Attachment__c on the standard sObject Case to FALSE?

I would have thought that I could reach this custom field on Case from Attachment through the relationship name Attachments (I have verified the name of the this relationship in Workbench), but it is not working.

See my code below and line 65?
User-added image
 
In Visual Studio Code, when invoking the "Show All Commands" with Ctrl + Shift + P, and staring to write "Create Project" you can see 2 options:

1) Create Project;
2) Create Project with Manifest;

What are the differences between these 2 options?

If you want to download all the codes and metadata from a Salesforce environment, which of the 2 options should I use and why?

Thank you.
Hello Dear experts in Omni-Channel AND security settings:
  • Definition of problem:
I try to create a new record on the standard object "Service Resources" and I get an error message saying "Insufficient Priviledges" You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is encessary."
  • Context:
- My user has the (standard) Profile System Administrator;
- My user has a Role "System Administrator" (positioned at the top of the role hierarchy);
- Sharing settings on object "Service Resources·":
. No sharing rules set up at all;
. Default Internal Access: Private
 
  • Question:
What is going on here? why cannot I create a new record of type Service Resources?
 
Hello,

I am trying to display a number of different "Presence statuses" that I have defined in Setup>Customize>Omni-Channel>Presence Statuses.

I have added each of these Presence Statuses to the Profile I want to grant access to (with Enable Service Presence status Access Related List on Profile).

But, that does not seems to be sufficient as these new Presence Statuses I have created do not display anywhere on the Service Console (where I am requested to display them).

Any clue of what I am missing?

Thank you very much.
When keying sfdx from cmd or from the VS Code Terminal, I am getting the error: 'sfdx' is not recognized as an internal or external command, operable program or batch file.

Any clue on how to fix this?
 
How can I add a functionality on the Service Console allowing Service Reps to easily set their Status (Available to work, Break, Lunch, etc..) so that:
  1. A System Admin can setup Case Assignment (Assign Cases to Users ONLY if their Status == Available to Work);
  2. Report on Time Spent by each Sales Rep on each Status;
The Product Owner is asking for a Button or field or some kind of functionality to let Sales Rep easily indicate their Status when from the Service Console.

In another hand, I have seen that the "Live Agent" functionality offers a little window where is it possible for the Agent to set his/her availability (as in the screenshot).Live Agent window on Service Cloud

Should I think of adding a picklist field somewhere on the Service Console? (How?)

 
This is regarding the new Flow Builder made GA in January 2019:

How can I possibly pass various variables of type Text (string) created in a Flow to an Apex Class.

How do I need to create my variables in my Apex Class so as to make them available the Flow "Apex Action" component?

Thank you.
Hello Stars,

From within a Flow, I want to merge an Email Template with variables and Constants defined within such Flow.

From the Flow, I am referencing an Email Alert which is, in turn, referencing a Classic Email Template (in the Communication Templates Setup menu).
I know that the Classic Email Template can be merged with fields created on the object from which the email is sent. But this is not what I need.
I need the values to be merged with the Email Templates to be defined on the Flow as Constants and/or Variables.

The reason I want to use flow for that is because the criteria to send this email are very complex and Flows is resolving this complexity very well.

But now, I am trying to avoid having to create many Email Templates and, instead, I would like to have only 1 Email Template that could be merged with Contants and Variables predefined on my Flow.

Is that even possible?

Thank you very much.
Hello,
I am currently using SFDC's Developer Console (because it's on the cloud) but would like to know the opinion of Developers who have worked with (or may have tried) other IDEs for Force.com.
I have come across various alternative IDEs such as:
  1. MavensMate which is not supported any more (Dec-2017) and the owner suggest to look at "Visual Studio Code Extension";
  2. Visual Studio Code Extension;
  3. Welkin Suite (It looks like a paid option but cannot see the price on their website);
  4. Illuminated Cloud (hosted within JetBrains Intellij IDEA); price seem to be 65 USD for 1 or few licenses (and we never know if the vendor will charge new versions)
  5. The traditional Force.com IDE Eclips based (Free but a real pain to install in a Mac);
  6. Any other IDE?
Could you possible let us know your opinion and if you would advise using one or the other? Maybe you could comment on Pros/Cons for each IDE you know?

Thank you very much.
Hello,

Here is a phrase (highlighed in red below) I do not understand in this Trailhead: Buld Apex Triggers.

User-added image
I totally do understand the benefits of bulkifying SOQLs and DMLs in apex triggers and/or apex Classes.

But, I think this phrase (forgive my poor English) is refeering to statements where you combine a for each loop and an SOQL ? Like below, in lines 5 and 6:
trigger SoqlTriggerBulk on Account(after update) {  
    // Perform SOQL query once.    
    // Get the related opportunities for the accounts in this trigger,
    // and iterate over those records.
    for(Opportunity opp : [SELECT Id,Name,CloseDate FROM Opportunity
        WHERE AccountId IN :Trigger.New]) {
  
        // Do some other processing
    }
}
But, I do not quite understand the relationship between the fact that you can "unify" in one statement the for each and the SQL AND a potential "Benefit" to do this in terms of performance or efficiency.

What do you mean by "benefit of SOQL for loop"?

Thank you  very much.

 
Hello Stars!

I need to know the followign information for each User in Salesforce Org.:
  1. what Public Groups are related to each User;
  2. what Permission Sets are related to each User;
  3. what Teams are related to each User;
  4. what Territorries are related to each User;
Beware: there are 4000+ Users so I cannot check this on a User-by-User basis; instead I am looking for an SOQL query to be executed with 'Salesforce Inspector', the 'Dev Console' or 'SF Workbench' or with standard Reports based on a custom Report type?).

The reason I need this information is to, eventually, more easily review all the Sharing Rules (identifying each sharing rule by Ctrl+F searching specific Public Groups) so as to ultimately understand what users are accessing records (because of sharing rules sharing with Public groups) that they should not (historically, security settings has deteriorated and access to data has become a party that I need to remediate).

Could you possibly help witht he above SOQL sentences?

Thank you very much.
Could you please let me/us know what Laptop/Operating System would you prefer working with or recommend (for a Salesforce Developer working with Apex, VF and Lightning -- and SFDX on VSC):
  • Windows?
  • Mac?
Why? (Please, with your answer, let me know why)

(I am looking for getting a brand new Laptop during 1st Quarter thank you 2020).

Thank you very much.

Kind regards.
Is there a way, with Apex, to deliver the folowing requirement:

When Now() falls withing 45 days before a deadline DateTime on the Account, then in such scenario:

First: verify if this Account already has a Case with criteria xyz; if such Case record already exist, update it;

Second: if no such Case exists, then create a Case with attributes xyz.

 
A trigger on the following objects won't detect the deletion of a File (not Attachment but... an attached "File") when the deletion is performed by a user from Salesforce Service Console.

The triggers I have been testing with System.debug() were done on the following objects:
  • ContentDocument
  • ContentDocumentLink
  • ContentVersion
I have searched with Google a way to detect when a user is deleting a file from the Service Console (so as to consequently edit a bolean field on the parent object) but I cannot find anything.

I have found this Salesforce article which specify which object we should trigger on in order to detect the deletion bu this article does not mention the Service Console.

Based on my empirical tests, it has become obvious that Service Console does not have the same behaviour as Salesforce Classic when deleting a File from an sobject such as Case.
 
Hello,

On line 65, how can I set the value of the custom field Has_Attachment__c on the standard sObject Case to FALSE?

I would have thought that I could reach this custom field on Case from Attachment through the relationship name Attachments (I have verified the name of the this relationship in Workbench), but it is not working.

See my code below and line 65?
User-added image
 
Hello,

I am trying to display a number of different "Presence statuses" that I have defined in Setup>Customize>Omni-Channel>Presence Statuses.

I have added each of these Presence Statuses to the Profile I want to grant access to (with Enable Service Presence status Access Related List on Profile).

But, that does not seems to be sufficient as these new Presence Statuses I have created do not display anywhere on the Service Console (where I am requested to display them).

Any clue of what I am missing?

Thank you very much.
When keying sfdx from cmd or from the VS Code Terminal, I am getting the error: 'sfdx' is not recognized as an internal or external command, operable program or batch file.

Any clue on how to fix this?
 
How can I add a functionality on the Service Console allowing Service Reps to easily set their Status (Available to work, Break, Lunch, etc..) so that:
  1. A System Admin can setup Case Assignment (Assign Cases to Users ONLY if their Status == Available to Work);
  2. Report on Time Spent by each Sales Rep on each Status;
The Product Owner is asking for a Button or field or some kind of functionality to let Sales Rep easily indicate their Status when from the Service Console.

In another hand, I have seen that the "Live Agent" functionality offers a little window where is it possible for the Agent to set his/her availability (as in the screenshot).Live Agent window on Service Cloud

Should I think of adding a picklist field somewhere on the Service Console? (How?)

 
Hello Folks,

When receiving the "Credential Status" email from Salesforce (after going to https://t.co/xfXDlCbX1f) for some reason (?) my Trailhead Profile appears as "not linked" (blank):
Here is a screenshot of the portion of the received email:

User-added image

What do you think the reason is?
Salesforce has set a deadline to resolve this: 14th-Decembre-2018
Any clue?

My Webassessor seems to be linked already (as displayed above on the screenshot).

I can see that my Trailhead settings show my linked account as "inactive" (?) - I do not know what that means.

User-added image
I have tried clicking the button "connect or merge" and I have re-provided my login credentials for my users but it says "Whoops, looks like there was a problem. Account already linked to this profile."

How can I resolve this? (Salesforce Trailhead Support has not replied my Case#00028586 which I created on the 14th November!)

Thank you very much.
Hello,
I am trying to learn about SFDX and have installed Visual Studio Code + Salesforce Extensions.
I skiped the step that says "Make sure you have the latest version of the Salesforce CLI installed, and that your system meets the necessary requirements." because, before installing VS Code + the SF Extensions, I reviewed the list of extensions includeded in SF Extensions and saw that it included CLI.
It was a confusion moment and... I think I also read out there that it was better to installed CLI as part of SF Extension (which includes a set of extensions).

Eventually, because I was not able to create new Project from VS Code (Ctrl+Shift+P), I decided to revisite the steps to set up SF DX with VS Code, and decided to intall SF CLI by downloading a file (win64) from here (https://developer.salesforce.com/tools/sfdxcli ) and execute installation of that file.

Right now, my laptop has the following installed:
- Visual Studio Code + Salesforce Extensions (look at screenshot below)
- Salesforce CLI (win64) dowloaded from the above link

User-added image

How can I verify if Salesforce CLI works fine? I have tried executing cmd.exe the following command: sfdx --version
... but I am getting this error message:
User-added image

Do you think that the fact that I installed SF CLI after installing VS Code is the reason for the above command line not being recognized?

How can I make sure that I have all the SFDX tools correctly installed?

Thank you very much.

 
Hi Community,

I have enabled multi-currency in my org (sandbox and production, LEX), but I have two different Account CurrencyISOCode field behaviour:
  • Sandbox (Winter19, Unlimited Edition): the currency field is displayed on edit mode but is not displayed in detail page.
  • Production (Summer18, Unlimited Edition): the currency field is displayed on edit mode and in detail page.
The currency field is showing up on the payout layout editor. I have checked Field Accessibility and Field Level Security and both are okay (both orgs with the same configuration).
I need to hide the field in for the Account Layout (detail page), but I am not able in PROD. 

I found some issues that could be related to this topic, but is not clear:
  • https://success.salesforce.com/answers?id=90630000000ZjjFAAS
  • https://help.salesforce.com/articleView?id=000004023&type=1
  • https://success.salesforce.com/answers?id=90630000000goIKAAY
Please any feedback on this? Truly appreciated.

Thanks in advance,
Natalia