Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Vanitha ManiVanitha Mani 
Hi,

I am trying to detach a article from case when clicking the button in lightning component..how to achieve this.

Apex class:
@AuraEnabled
    public static String detachArticleToCases(String caseId, String articleId){
       List<CaseArticle> searchCaseArticleList =[select Id from CaseArticle where CaseID =:caseId];
          
String message = 'SUCCESS';
  if (searchCaseArticleList.size() > 0){
      CaseArticle ca = new CaseArticle(); 
      ca.CaseID = caseId; 
      ca.KnowledgeArticleId = articleId; 
      delete ca; 
  } 

  
return message;

    }

Aura component:
<aura:iteration items="{!v.Knowledge__kav}" var="Knowledge__kav">
                <tr>  
                  
                    <td><div class="slds-truncate" title="{!Knowledge__kav.ArticleNumber}">{!Knowledge__kav.ArticleNumber}</div></td>   
                    <td><div class="slds-truncate" title="{!Knowledge__kav.Title}">{!Knowledge__kav.Title}</div></td>
                    
                    <td><div class="slds-truncate" title="{!Knowledge__kav.System__r.Name}">{!Knowledge__kav.System__r.Name}</div></td>
                    <td><div class="slds-truncate" title="{!Knowledge__kav.Product__r.Name}">{!Knowledge__kav.Product__r.Name}</div></td>
                     <td><div class="slds-truncate" title="{!Knowledge__kav.LastPublishedDate}">{!Knowledge__kav.LastPublishedDate}</div></td>
                    <td><div class="slds-truncate" title="{!Knowledge__kav.Version__c}">{!Knowledge__kav.Version__c}</div></td>
                    <lightning:button variant="brand-outline"  label="Attach" onclick="{!c.handleClick}" value="{!Knowledge__kav.KnowledgeArticleId}"/> 
                    <lightning:button variant="brand-outline"  label="Detach" onclick="{!c.handleClick1}" value="{!Knowledge__kav.KnowledgeArticleId}"/>
                                    
                </tr>
            </aura:iteration>

Controller:
 handleClick1 : function(component, event, helper) {
        var action = component.get('c.detachArticleToCases');
       let recordId = component.get("v.recordId");
     var KnowledgeArticleId = event.getSource().get("v.value");
      
       action.setParams({
            caseId:recordId,  // Make sure your component implemented force:hasRecordId interface
           articleId: KnowledgeArticleId 
       });
       action.setCallback(this,function(a){
         var state = a.getState(); // get the response state
           if(state == 'SUCCESS') {
              var toastEvent = $A.get("e.force:showToast");
        toastEvent.setParams({
                        "title": "Success!",
                        "message": "Article detached from case",
                        "type": "success"
                    });
        toastEvent.fire();
            }
           else{
               var toastEvent = $A.get("e.force:showToast");
        toastEvent.setParams({
                        "title": "Error!",
                        "message": "error",
                        "type": "Error"
                    });
        toastEvent.fire();
           }
        });
        $A.enqueueAction(action);
       $A.get('e.force:refreshView').fire();
    },
Best Answer chosen by Vanitha Mani
Keiji OtsuboKeiji Otsubo
Hi Vanitha,

As far as I can see, it doesn't seem to be a problem.
Do you get any errors?

List<CaseArticle> searchCaseArticleList =[select Id from CaseArticle where CaseID =:caseId];
Is the count of searchCaseArticleList 1 or more?

Permissions needed to detach an article from a case
https://help.salesforce.com/articleView?id=000339821&type=1&mode=1
Pallavi MangalPallavi Mangal 
Hi,

I'm doing "Superbadge Apex Specialist Challenge#2 - Synchronize Salesforce data with an external system". 

I can debug and saw Future call is getting created and completed successfully and records are also upsert but the system is not able to find it and giving me the following error message.

"Challenge Not yet complete... here's what's wrong:
The WarehouseCalloutService class does not appear to have run successfully. Make sure that you run this class at least once before attempting this challenge. Since this class is implementing the queueable interface, you may want to wait to ensure that it has processed successfully."

I ran successfully future method.
Best Answer chosen by Aishwarya (salesforce.com) 
Pallavi MangalPallavi Mangal
The Problem got resolved. I was using Future call in place of Queueable.

 
Shubhashini RajaShubhashini Raja 
Hello Trailblazers!!
I cleared my Admin Certification today. I'm so happy. Thank you so much Trailblazer Community for helping me accomplish this. You guys have responded immediately for every question I posted and thanks a lot for sharing the required materials on topics I need referencing. You guys are amazing. Let's keep Blazing!!

Next prep for "Advanced Admin"
 
Best Answer chosen by Shubhashini Raja
Sakthivel MadeshSakthivel Madesh
Wow.. Congratulation Shubhashini !!

Try this trailmix from trailhead - https://trailhead.salesforce.com/en/users/strailhead/trailmixes/prepare-for-your-salesforce-advanced-administrator-credential

Advanced Administrator Quiz from SalesforceBen Website - https://www.salesforceben.com/certified-advanced-administrator-quiz/
Dave ParadiseDave Paradise 
I'm having an issue with the final step of the Customize a Dashboard with Einstein Analytics Advanced Editor Project (https://trailhead.salesforce.com/content/learn/projects/customize-a-dashboard-with-einstein-analytics-advanced-editor/build-dynamic-topn-queries-and-add-a-greeting?trail_id=wave_analytics_enable_and_produce) - Upon trying to verify it, I get this error, "We could not find your greeting. Please set up your LoggedInUser in the JSON as described above."
 
This is despite having the Personal Greeting widget on the dashboard with the proper query variable bound.
 
Has anyone managed to complete this Project without that issue?

Screenshot with the personal greeting in place.
Best Answer chosen by Jyothsna (salesforce.com) 
JyothsnaJyothsna (salesforce.com) 
Hi Dave,

In reviewing them it appears that step (4) in topic "Query the User Object Using SOQL" wasn't completed.


https://trailhead.salesforce.com/en/content/learn/projects/customize-a-dashboard-with-einstein-analytics-advanced-editor/set-up-a-salesforce-direct-query


Validation is expecting the query name 'LoggedInUser'. I can't see the ''LoggedInUser'' in your dashboard. I recreated the dashboard and successfully verified the challenge.

Thank you!
nitin gopunitin gopu 
This is the error i got in app customization super badge help me out
Best Answer chosen by nitin gopu
nitin gopunitin gopu
I got it change field label to Desired # of Volunteers
Deepika BhattaDeepika Bhatta 
I am having a problem while creating a user Lincoln Ulrich. It does not let me check Marketing User in his profile.
Best Answer chosen by Deepika Bhatta
Balaji VadlamudiBalaji Vadlamudi
That means you have used all the available licenses. You can disable one of the existing users to free up licenses.

Go to Setup -> Company Information to see license information.
Lisa JacksonLisa Jackson 
I wonder if anyone knows if there is a limit to the number of process builders per org? I know of workflow limits but can't find any documentation which tells me of any limits to the amount of processes in Process Builder?

Many thanks
Best Answer chosen by Lisa Jackson
Best Answer chosen by Nidhi Mehta
Keiji OtsuboKeiji Otsubo
Hi Nidhi,

When I look at any similar image, there is no ",else Reject". Something seems to be different.

https://www.google.com/search?rlz=1C1CHBD_jaJP818JP818&sxsrf=ALeKk0198eXR9XHH5ijzhbss4mqyW_KV6Q:1607996148062&source=univ&tbm=isch&q=(Account:+Type+EQUALS+Prospect)+AND+(Account:+Employees+GREATER+THAN+500)&sa=X&ved=2ahUKEwjU99G57M7tAhWUAYgKHQ9SBGIQjJkEegQIBRAB&biw=1920&bih=965#imgrc=Av_EfnZ-wB5x4M

 
Solange AndradeSolange Andrade 

Hey,
 

I am working on this Trailhead Project: 

Protect Your Data in Salesforce

 

I've come across a issue:

- I cloned “Standard Platform” to new profile (Standard Profile - No Acct Delete)

The goal is remove the delete permission to some users (till here was ok)

But when I´m registering a new user and select the “user license: Standard Platform”

I didn't have the new profile option that I created before: Standard Profile - No Acct Delete.

It appears only in the Salesforce license. I don't know what happens.Is it ok? How can I use the new profile in the Salesforce Platform?

Thanks.

Solange
 
Best Answer chosen by Solange Andrade
Saikanth GSaikanth G
Hi Solange,
I just checked this project & and I'm wondering why you have selected "Standard Platform", but as per the challenge "Salesforce Platform" has to be selected. Hope this resolves.
Soma Sekhar KSoma Sekhar K 
how to prevent duplicates and how to handle existing duplicate records in the org and how this is easy for admins to maintain as new changes arise?

Can anyone help on which is best practice to achieve this in my salesforce org?

Thanks
Best Answer chosen by Soma Sekhar K
Coby PressCoby Press
There's actually quite a lot you can implement here.
  1. When you convert a lead, it automatically looks for accounts/contacts that already exist
  2. on a record in the related list you might see a 'no duplicates found', the system is looking for duplicates of some standard objects, if you can't see this, edit the lightning record page.
  3. probably the best one, is duplicate rules, check out this trailhead on how to create your own rules for finding duplicates in the org. 

https://trailhead.salesforce.com/en/content/learn/modules/contact-and-account-settings-in-nonprofit-success-pack/merge-duplicate-contacts-and-accounts-npsp


https://powerofus.force.com/s/article/NPSP-Merging-Contacts

https://www.salesforce.org/blog/duplicate-management-nonprofit-starter-pack/