• Ricki Reay
  • NEWBIE
  • 40 Points
  • Member since 2019
  • Salesforce Administrator
  • G&F Financial Group


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 4
    Replies
Hi there,

I am trying to give users custom help resources in the "?" menu within our training (sandbox) Salesforce instance. However, all non System Admin users are getting an error message everytime I turn the custom help resources functionality on (note: we are using Lightning), regardless of what resources I link...I even tried just linking "https://www.google.com".

They are not getting this error in Production, just all of our sandbox orgs. Please help, as I can not find anything on this error in the trailblazer community forums.

Thanks in advance,

Ricki

User-added imageUser-added image

 
Hi there,

I am working on customizing my organization's login page's right side image. I followed a tutorial article posted by someone that explained how to use the SF > Set Up > Site to create a secure HTTPS url and then format the image on a Visualforce page to use on the Site. 

I have done this, and everything works great, expect the image does not dynamically stretch in length. If the browser is fully maximized, the image does fill the screen, however, if it is minimized to not fill the screen there is a blank white space underneath it (see image attached). I have tried to change the visualforce coding of the page, but cannot get it to work. 

Any help and insght to fix this issue is greatly appreciated.
Thanks in advance,

Ricki

For reference, here is the VF page code I have in place currently. The image I want to show and fill on the right side of the login page is saved as a Static Resource in my SF org as "LifeBeyondBanking".
<apex:page showHeader="false" sidebar="false" >
<apex:image id="LifeBeyondBanking" value="{!$Resource.LifeBeyondBanking}" width="100%" height="100%" alt="Company Name - Life Beyond Banking"/>
</apex:page>


Blank space underneath right side URL image (coded on VF and hosted on SF site)
Hello All, 

I am working on deploying a custom APEX trigger on the Case object that automatically initiates my org's active case assignment rules whenever a new case is created (except cases created with the record type name = "Member Concern"). In our configured org., we are having users create most new cases through Action Buttons, which unfortunately has the limitation that it cannot default the assignment rules and therefore, I require this apex trigger.

Here is my current trigger code that I have tested in my sandbox org: 
trigger AssignmentRulesonCaseTrigger on Case (after insert) {
    List<Id> caseIds = new List<Id>{};
    Id RecordTypeId = Schema.SObjectType.Case.getRecordTypeInfosByName().get('Member Concern').getRecordTypeId();
    if(trigger.IsAfter && trigger.isInsert ){
        for (Case theCase:trigger.new)
        {
            if(theCase.RecordTypeId != RecordTypeId)
            {
                caseIds.add(theCase.Id);
            }
        }        
        List<Case> cases = new List<Case>{};
        
        if(caseIds.size() > 0)
        {
            for(Case c : [Select Id from Case where Id in :caseIds])
            {
                Database.DMLOptions dmo = new Database.DMLOptions();
                dmo.assignmentRuleHeader.useDefaultRule = true;
                c.setOptions(dmo);
                cases.add(c);
            }
            Database.upsert(cases);
        }
    }
 }
I am very new to Apex and I am having difficulty navigating the creation of a custom test class that will allow me to deploy the above trigger into Production. Could someone provide me guidance/assistance on how to write a test class that will provide the coverage needed to deploy this trigger?

Thanks in advance - any and all help is GREATLY appreciated.

Ricki
 
Hi there,

I am working on deploying a custom APEX trigger on the ContentDocumentLink object that checks a custom checkbox field called Has_Attachment__c on a custom object called "Advice" (Advice__c) when a file has been uploaded within a record. 

Here is my current Trigger code:
trigger ContentDocumentLinkTrigger on ContentDocumentLink ( after insert, after update, after delete ) {

    List<ContentDocumentLink> cdls = ( Trigger.new == null ? Trigger.old : Trigger.new );

    Set<ID> parentIds = New Set<ID>();

    for ( ContentDocumentLink cdl : cdls ) {
        parentIds.add( cdl.LinkedEntityId );
}

    for ( List<Advice__c> adviceToUpdate: [ SELECT Id, ( SELECT Id FROM ContentDocumentLinks LIMIT 1 ) FROM Advice__c WHERE Id IN :parentIds ] ) {
        
        for ( Advice__c q : adviceToUpdate) {
            q.HasAttachment__c = true ;
        }

        update adviceToUpdate;

    }

}
Evidently, now that I am trying to move it into my Production org., I am required to have at least 75% code coverage. I am very new to Apex and I am having difficulty finding the right resources to help me create a test class.

Could anyone provide some assistance with creating an test class for my trigger above that will allow me to deploy it into Production? 

Thanks in advance for any and all help. I really appreciate it.

Ricki
 
Hi there,

I am working on a custom APEX trigger that validates whether users have attached a file to a record in a custom object. 

Custom Object: Advice

Context: users must upload a file to their Advice records in order to recieve credit for the record - this is a requirement for reporting. I have created a custom checkbox field called, "Has Attachment" (API: HasAttachment__c) on the Advice object and implemented a trigger that sets HasAttachment__c = true when a file is uploaded. However, I am now trying to add on to the trigger so that it sets HasAttachment__c = false if the file is subsequently deleted. That is, if the record becomes empty again (no file) after there previously was a file uploaded, then the checkbox would be = false.

Here is my trigger code so far...it is on the Content Document Link object: 
 
trigger ContentDocumentLinkTrigger on ContentDocumentLink ( after insert, after update, after delete ) {

    List<ContentDocumentLink> cdls = ( Trigger.new == null ? Trigger.old : Trigger.new );

    Set<ID> parentIds = New Set<ID>();

    for ( ContentDocumentLink cdl : cdls ) {
        parentIds.add( cdl.LinkedEntityId );
}

    for ( List<Advice__c> adviceToUpdate: [ SELECT Id, ( SELECT Id FROM ContentDocumentLinks LIMIT 1 ) FROM Advice__c WHERE Id IN :parentIds ] ) {
        
        for ( Advice__c q : adviceToUpdate) {
            q.HasAttachment__c = true ;
        }

        update adviceToUpdate;

    }

}
If anyone could provide any help, suggestions or guidance, it would be GREATLY appreciated. Thanks in advance.
I am trying to create a trigger that automatically fires my org's case automation rules (i.e. auto assigns it to the Case Queue so that we can use the quick actions which do not have the "Use Active Assignment Rules" feature yet to create cases). However, there is one case type that does not go to a Case Queue and therefore, I do not want to it automatically use active assignment rules as it will automatically assign it to our Default Case Owner.

My current trigger is:
trigger AssignmentRulesonCaseTrigger on Case (after insert) {
List<Id> caseIds = new List<Id>{};
if(trigger.IsAfter && trigger.isInsert ){
for (Case theCase:trigger.new)
caseIds.add(theCase.Id);        
 List<Case> cases = new List<Case>{};
for(Case c : [Select Id from Case where Id in :caseIds])
 {
 Database.DMLOptions dmo = new Database.DMLOptions();
 dmo.assignmentRuleHeader.useDefaultRule = true;
c.setOptions(dmo);
     
 cases.add(c);
             
}
Database.upsert(cases);
        }
 }
I want to make a condition saying that the trigger does not fire if the case record type is = "Member Concern" or the specific Record Type ID associated to this record type.

How do I go about doing so?

Thanks in advance for any and all help. It is GREATLY appreciated.

 
Hi there,

My organization is currently testing Single Sign-On using Azure and our Active Directory. We are using it in our sandbox environment as of now, but have run into some difficulty with bypassing the login page. Currently, as the administrator, I have the ability to hide the Salesforce login, but it still makes users click a button and then sign on using the Active Directory (AD) sign in. I am not able to hide both the Salesforce standard login (user/password required) and the button which directs users to the external login service. 

I am working with my IT team, going through Azure's guide to setting up SSO in Salesforce. However, we cannot figure out if we will be able to completely bypass the login. Ideally, we want it so that when users login to our computers (using their Active Directory username and password) and open up our Salesforce domain, it will take them directly to our organization's Salesforce homepage and not require them to do any login-related steps.

Any help and insight is greatly appreciated. Thanks in advance.

Ricki
Hi there,

I am looking for a way to display help text for users submitting cases to our IT department that would show up and change depending on what picklist value is selected (for the field "Problem Type" which has values such as: "Mobile Phone," "Computer Hardware," Computer Software," "Reset Password," "Outlook", "Printers/Copiers", etc.). 

Currently, using another system (not Salesforce, but we are looking to migrate IT cases to Salesforce) users are given instructions depending on the "Problem Type" selected, such as what to include in the notes section of the case or steps to take prior to submitting the case. Therefore, I am looking to have this dynamic text show up prior to the case being submitted. Ideally, it would show up right under the "Problem Type" picklist on the record creation/edit form.

Does anyone have any ideas for how I would be able to achieve this functionality? I am hoping there is a OOTB/AppExchange solution, but open to all ideas.

Thanks in advance,

Ricki
Hi there,

I am working on deploying a custom APEX trigger on the ContentDocumentLink object that checks a custom checkbox field called Has_Attachment__c on a custom object called "Advice" (Advice__c) when a file has been uploaded within a record. 

Here is my current Trigger code:
trigger ContentDocumentLinkTrigger on ContentDocumentLink ( after insert, after update, after delete ) {

    List<ContentDocumentLink> cdls = ( Trigger.new == null ? Trigger.old : Trigger.new );

    Set<ID> parentIds = New Set<ID>();

    for ( ContentDocumentLink cdl : cdls ) {
        parentIds.add( cdl.LinkedEntityId );
}

    for ( List<Advice__c> adviceToUpdate: [ SELECT Id, ( SELECT Id FROM ContentDocumentLinks LIMIT 1 ) FROM Advice__c WHERE Id IN :parentIds ] ) {
        
        for ( Advice__c q : adviceToUpdate) {
            q.HasAttachment__c = true ;
        }

        update adviceToUpdate;

    }

}
Evidently, now that I am trying to move it into my Production org., I am required to have at least 75% code coverage. I am very new to Apex and I am having difficulty finding the right resources to help me create a test class.

Could anyone provide some assistance with creating an test class for my trigger above that will allow me to deploy it into Production? 

Thanks in advance for any and all help. I really appreciate it.

Ricki
 
Hi there,

I am working on a custom APEX trigger that validates whether users have attached a file to a record in a custom object. 

Custom Object: Advice

Context: users must upload a file to their Advice records in order to recieve credit for the record - this is a requirement for reporting. I have created a custom checkbox field called, "Has Attachment" (API: HasAttachment__c) on the Advice object and implemented a trigger that sets HasAttachment__c = true when a file is uploaded. However, I am now trying to add on to the trigger so that it sets HasAttachment__c = false if the file is subsequently deleted. That is, if the record becomes empty again (no file) after there previously was a file uploaded, then the checkbox would be = false.

Here is my trigger code so far...it is on the Content Document Link object: 
 
trigger ContentDocumentLinkTrigger on ContentDocumentLink ( after insert, after update, after delete ) {

    List<ContentDocumentLink> cdls = ( Trigger.new == null ? Trigger.old : Trigger.new );

    Set<ID> parentIds = New Set<ID>();

    for ( ContentDocumentLink cdl : cdls ) {
        parentIds.add( cdl.LinkedEntityId );
}

    for ( List<Advice__c> adviceToUpdate: [ SELECT Id, ( SELECT Id FROM ContentDocumentLinks LIMIT 1 ) FROM Advice__c WHERE Id IN :parentIds ] ) {
        
        for ( Advice__c q : adviceToUpdate) {
            q.HasAttachment__c = true ;
        }

        update adviceToUpdate;

    }

}
If anyone could provide any help, suggestions or guidance, it would be GREATLY appreciated. Thanks in advance.
I am trying to create a trigger that automatically fires my org's case automation rules (i.e. auto assigns it to the Case Queue so that we can use the quick actions which do not have the "Use Active Assignment Rules" feature yet to create cases). However, there is one case type that does not go to a Case Queue and therefore, I do not want to it automatically use active assignment rules as it will automatically assign it to our Default Case Owner.

My current trigger is:
trigger AssignmentRulesonCaseTrigger on Case (after insert) {
List<Id> caseIds = new List<Id>{};
if(trigger.IsAfter && trigger.isInsert ){
for (Case theCase:trigger.new)
caseIds.add(theCase.Id);        
 List<Case> cases = new List<Case>{};
for(Case c : [Select Id from Case where Id in :caseIds])
 {
 Database.DMLOptions dmo = new Database.DMLOptions();
 dmo.assignmentRuleHeader.useDefaultRule = true;
c.setOptions(dmo);
     
 cases.add(c);
             
}
Database.upsert(cases);
        }
 }
I want to make a condition saying that the trigger does not fire if the case record type is = "Member Concern" or the specific Record Type ID associated to this record type.

How do I go about doing so?

Thanks in advance for any and all help. It is GREATLY appreciated.