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


  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 9
    Replies
Hi Everyone,

I am working with an org. that is using Financial Services Cloud right now to manage their customers - who are both individual clients (i.e. Person Account records) or contacts on business accounts (i.e. Business Account records with Business Contacts linked). They have asked about allowing customers to access Salesforce via a portal to input information related to budgeting. 

For example. if I were a Person Account record in this org.'s existing FSC database, I would be able to go through this external portal, type in information related to my income/goals/etc. and this would automatically create a record (likely within a custom object called like "Budget Calculator" or something along those lines) that would be linked to my PA record and visible to staff in FSC. This custom object would have a one-to-many with the account object - i.e. a customer could technically create multiple records that would be linked to their Person Account or Business Account record in FSC.

I am reading through the Trailhead and information Salesforce has on Community Cloud licenses and Community Cloud Plus licenses, however I am also seeing other posts about not having to go down the licenses route to solve for similar use cases. So my question is - would the org. I am working with need to purchase Community Cloud licenses in order to allow customers to create records that would automatically link to their existing account record in Salesforce (FSC)? Is there anything else I should be aware of when investigating the best way to solution this use case?

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

Best,

Ricki
Hi there,

I am trying to set up my org's SSO (which is done through Azure (IDP)) so that users are always brought to the Salesforce Home tab, rather than the last tab or record they were on. My organization uses Financial Services Cloud and work within the Retail Banking Console application. Users are able to authenticate their login through Azure, using their Microsoft credentials, to access Salesforce.

I have been reading some articles about updating the ReplyURL and RelayState in Azure, however I have not had any luck in getting this working.

Can anyone provide any guidance, insight or resources that would allow for me to ensure users are always brought to the home page once they have successfully authenticated and are logged into Salesforce?

Thanks in advance,

Ricki
Hi Everyone,

An organization I am working with uses the Retail Banking Console app (from the Financial Services Cloud managed package) and is actively using Azure as its IDP for single sign-on. The request is for all users to be directed to the Home page (i.e. have the "Home" object tab open up) everytime they log into Salesforce, instead of opening the most recent tab they were on when they last logged out of Salesforce. 

Does anyone have any insight on how to go about this?

Initially, I tried changing the Login URL in Azure to: https://orgs-instance.lightning.force.com/lightning/page/home and this seemed to be working at first, but now as I continue to run tests (logging in/logging out with various tabs open), it is not consistently redirecting me to the Home page and just doing the same thing as before (opening up the last tab I had open during my last SF session).

How can I modify the org so that users are forced to the homepage right when they first log in every day?

Thanks in advance for any and all insight. Please let me know if I can provide any further information for context.

Best,

Ricki
Hi Everyone,

I was wondering if anyone could point me in the right direction or offer any insight on the "IsConverted" field that is on the lead object. Right now, in two orgs. I am working in this field is defaulted to TRUE so that every lead entered into their SF orgs. has a IsConverted value = TRUE (even if they haven't been converted). This field is then mapped onto the contact object onto a identifical field which has a default value of FALSE. This makes sense in that when you convert a lead the resulting contact will then show that they were converted from a lead (i.e. their IsConverted value will be marked as TRUE from the value from the lead that created them upon conversion).

However, looking through some SF resources and forum posts, I see people talking about reporting on converted leads by using this field value. In this case, I would expect the default value to be equal to FALSE on the lead until they are converted and then this is updated to TRUE. I tried a trial of this in a sandbox by marking the IsConverted field on a lead as FALSE and then converted, but then the FALSE value was just brought over onto the converted contact (i.e. there is no default workflow or trigger in the background that updates this upon conversion). Can someone explain this further? Should the default value on the lead be TRUE? 

Thanks in advance for all insight.

Ricki
Hi All,

For context and background, I am working with an organization that is using Financial Services Cloud. Within FSC, there is a custom object called "Financial Accounts" and within this object there is a record type called "Credit Card".

Within opportunities, we are creating a workflow where users are forced to link a valid credit card (financial account) record in order to close their credit card-related opportunities. I am looking to create a trigger (and test class for eventual deployment) on the financial account record so that a custom checkbox field called "Linked To Won Opportunity" (API: LinkedToWonOpp__c) is set to TRUE when it has been linked to an opportunity record where the Stage = Closed Won. Conversely, I want create the trigger so it also updates this field "Linked To Won Opportunity" to FALSE if the opportunity record in which it was linked is either changed back from Closed Won to any open status OR if the link between the financial account record and opportunity no longer exists (i.e. the user deleted the card record ID from the Financial Account (lookup) field placed on the opportunity).

Any help or direction is GREATLY appreciated.

Thanks,

Ricki
Hi Everyone,

First off, for context, I am working within Salesforce's Financial Service Cloud financial package. With this package, there is a custom object called Financial Accounts. I have created a custom lookup on the Opportunity Product object so that users are forced (through validatoin rule) to link the valid Financial Account record with the Opportunity Product before marking their opportunity as "Closed Won". 

User-added image
So on the Opportunity Product "Add Product" form, there is a lookup(FinancialAccount) field "Financial Account" where I am trying to prevent users from being able to search/select any financial account that does not follow these parameters:

Record Type = Credit Card
Activated = TRUE
Linked to Won Opportunity = FALSE

I am getting close, but I am having trouble updating the Linked to Won Opportunity field so that I can use it in my lookup search criteria. 

What I am looking to build out is: when an opportunity linked to a valid (activated) credit card financial account record is marked closed won, I want a process to update that financial account record so that the field "Linked to Won Opportunity" = TRUE. I initially built out a process via PB that was initiated from the Opportunity Product object (as this allows me to link and update the Financial Account record), but then I realized that if a user changes the status of the opportunity to won, it is not prompting this process to won. I have hit a bit of a roadblock in trying to get the update from the opportunity object (i.e. status change to Closed Won) to initiate an update through to its opportunity products (that have a linked, valid financial account) then to the linked financial account to do the field update.

Does anyone have any ideas on how I could go about doing this? 

Thanks in advance for any and all ideas!

Ricki
Hi all,

I am trying to create a custom action on the Opportunity object which populates the "To" field (API: ToAddress) on the email form like it does on the Lead and Contact/Person Account records. I want the field to auto-populate with the Person Account if the opportunity is linked to a Person Account (i.e. IsPerson = TRUE) and auto-populate with a custom field Company_Email__c if the opportunity is linked to a Business Account (i.e. IsPerson = FALSE). 

In order to have email tracking working, one of the requirements is that the To field links to a Contact, Person Account or Lead in Salesforce. So I can't just pre-populate the field with the email address on the Person Account - as this would not be linked as per Salesforce's email tracking requirements. I need this field to pre-populate so that it links to the actual record in SF. I have tried pre-populating with ID for this field, but have had no luck. Here is the formula I was attempting to use for this "To" lookup field:

if( Opportunity.Account.IsPersonAccount = TRUE,  Opportunity.Account.PersonContactID, Opportunity.Account.Company_Email__c)

And this is the result: 
User-added image
Whereas, I want it to do this:
User-added image

Appreciate any and all help on this.

Thanks,

Ricki
Hi All,

I am working within Financial Services Cloud and trying to gather as much information as possible on the Last/Next Interaction Date fields. As of now, it is set up so that these fields update based on AdvisorTasks and AdvisorEvents, however I notice that this SF article (https://help.salesforce.com/articleView?id=000317198&language=en_US&type=1&mode=1)says that these fields will only be updated for Events and Tasks where task subtype = Call. 

Can I expand this so that all tasks, regardless of the subtype, impact these fields? Are there examples of other metadata types that can be added? Is there any way for me to have the activities on related leads impact these fields on the account (note: in FSC there is a custom lookup(acount) on the leads object called "Related Account" already).

Thanks in advance for any and all help/insight.

Ricki
Hello,

I am working with a developer on a button that pushes several demographic fields from the account object in Salesforce to an external system through API. The form where users will be filling out field values and pressing update is built within a lightning component. It was tested in a sandbox org. and was working, but since it has been pushed into production, the button is no longer worker for any user other than the developer who created the component and pushed it into SF. 

When any user but the developer tries to update the fields and push it into the external system, the push (from the backend where the developer is checking) shows no values (i.e. it is reading the fields as null even though users are putting in updated values) and therefore, nothing is being updated in the external system. I tried to see if there were any differences in permissions between the developer's user account and the other accounts we have been testing with, but have not found any. If anything, the other user accounts we are testing with have more permissions/access within the produciton SF org. than the developer's user account. Additionally, the developer has confirmed that nothing on the component's code has changed since the testing done in the sandbox.

I am wondering if any of you have any suggestions or insight on where I may look to try and troubleshoot this error? Is there any obvious reason why the push is only working for the developer and no other user? Why would the fields being pushed be showing null even when users are filling them in with updated values?

Thanks in advance for any and all help/insight.

Ricki
Hi everyone,

I have been working on this for the past week or so and have made absolutely no headway, despite trying to follow some other similar posts on this forum and the SF community forums. Here is the situation:

The org. I am working in uses the Financial Services Cloud managed package. With this package, the Lead object is renamed to "Leads and Referrals" and each of these records have the ability to be linked to an existing account record through a custom Lookup(Account) field titled "Related Account". The business requirement I am trying to fulfill is for a note to be generated on the existing account record everytime a new Lead and Referral record is created that is linked to the existing account. I am able to do it no problem if the Enhanced Notes are not enabled, but the org. I am working with is very active in using Enhanced Notes and do not want to take away that functionality.

Can anyone help me with creating a trigger or flow that would allow for me to create a new ContentNote record and link it to the existing account upon the creation of a related Lead and Referral reccord?

Thank you in advance. I really want to get this figured out - so any and all advice is greatly, greatly appreciated.

Look forward to hearing all of yours' insights!

Ricki
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 All,

I am working within Financial Services Cloud and trying to gather as much information as possible on the Last/Next Interaction Date fields. As of now, it is set up so that these fields update based on AdvisorTasks and AdvisorEvents, however I notice that this SF article (https://help.salesforce.com/articleView?id=000317198&language=en_US&type=1&mode=1)says that these fields will only be updated for Events and Tasks where task subtype = Call. 

Can I expand this so that all tasks, regardless of the subtype, impact these fields? Are there examples of other metadata types that can be added? Is there any way for me to have the activities on related leads impact these fields on the account (note: in FSC there is a custom lookup(acount) on the leads object called "Related Account" already).

Thanks in advance for any and all help/insight.

Ricki
Hello,

I am working with a developer on a button that pushes several demographic fields from the account object in Salesforce to an external system through API. The form where users will be filling out field values and pressing update is built within a lightning component. It was tested in a sandbox org. and was working, but since it has been pushed into production, the button is no longer worker for any user other than the developer who created the component and pushed it into SF. 

When any user but the developer tries to update the fields and push it into the external system, the push (from the backend where the developer is checking) shows no values (i.e. it is reading the fields as null even though users are putting in updated values) and therefore, nothing is being updated in the external system. I tried to see if there were any differences in permissions between the developer's user account and the other accounts we have been testing with, but have not found any. If anything, the other user accounts we are testing with have more permissions/access within the produciton SF org. than the developer's user account. Additionally, the developer has confirmed that nothing on the component's code has changed since the testing done in the sandbox.

I am wondering if any of you have any suggestions or insight on where I may look to try and troubleshoot this error? Is there any obvious reason why the push is only working for the developer and no other user? Why would the fields being pushed be showing null even when users are filling them in with updated values?

Thanks in advance for any and all help/insight.

Ricki
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)
Hi there,

I am trying to set up my org's SSO (which is done through Azure (IDP)) so that users are always brought to the Salesforce Home tab, rather than the last tab or record they were on. My organization uses Financial Services Cloud and work within the Retail Banking Console application. Users are able to authenticate their login through Azure, using their Microsoft credentials, to access Salesforce.

I have been reading some articles about updating the ReplyURL and RelayState in Azure, however I have not had any luck in getting this working.

Can anyone provide any guidance, insight or resources that would allow for me to ensure users are always brought to the home page once they have successfully authenticated and are logged into Salesforce?

Thanks in advance,

Ricki
Hi all,

I am trying to create a custom action on the Opportunity object which populates the "To" field (API: ToAddress) on the email form like it does on the Lead and Contact/Person Account records. I want the field to auto-populate with the Person Account if the opportunity is linked to a Person Account (i.e. IsPerson = TRUE) and auto-populate with a custom field Company_Email__c if the opportunity is linked to a Business Account (i.e. IsPerson = FALSE). 

In order to have email tracking working, one of the requirements is that the To field links to a Contact, Person Account or Lead in Salesforce. So I can't just pre-populate the field with the email address on the Person Account - as this would not be linked as per Salesforce's email tracking requirements. I need this field to pre-populate so that it links to the actual record in SF. I have tried pre-populating with ID for this field, but have had no luck. Here is the formula I was attempting to use for this "To" lookup field:

if( Opportunity.Account.IsPersonAccount = TRUE,  Opportunity.Account.PersonContactID, Opportunity.Account.Company_Email__c)

And this is the result: 
User-added image
Whereas, I want it to do this:
User-added image

Appreciate any and all help on this.

Thanks,

Ricki
Hello,

I am working with a developer on a button that pushes several demographic fields from the account object in Salesforce to an external system through API. The form where users will be filling out field values and pressing update is built within a lightning component. It was tested in a sandbox org. and was working, but since it has been pushed into production, the button is no longer worker for any user other than the developer who created the component and pushed it into SF. 

When any user but the developer tries to update the fields and push it into the external system, the push (from the backend where the developer is checking) shows no values (i.e. it is reading the fields as null even though users are putting in updated values) and therefore, nothing is being updated in the external system. I tried to see if there were any differences in permissions between the developer's user account and the other accounts we have been testing with, but have not found any. If anything, the other user accounts we are testing with have more permissions/access within the produciton SF org. than the developer's user account. Additionally, the developer has confirmed that nothing on the component's code has changed since the testing done in the sandbox.

I am wondering if any of you have any suggestions or insight on where I may look to try and troubleshoot this error? Is there any obvious reason why the push is only working for the developer and no other user? Why would the fields being pushed be showing null even when users are filling them in with updated values?

Thanks in advance for any and all help/insight.

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. 

We create "tasks" as reminders and also run reports on tasks. Sometimes those reminders are added in as notes for future reference (but we can't run reports on notes). So, sometimes things are entered in as tasks for reporting reasons.

What we want to do:
Create a checkbox on the task record that says "Create Note"
Once the task is complete, a note will be created on the record. Is there a way to do this? 
On the task itself, there's a "related to [record type] [lookup field]
Name [Contact/Lead] [Lookup Field]
We would want to create the note based on the record indicated on the task.

I created the custom field on the task already. I'm in the process builder, but can't seem to figure it out.

Thank you.