+ Start a Discussion
Carlos E. M. MagaldiCarlos E. M. Magaldi 
How I can to see sended emails by Salesforce Marketing Cloud API?

We have a system that make send emails by a API of our Salesfoece Marketing Cloud.

How can do to see the sends email make by this system through this API?
Best Answer chosen by Carlos E. M. Magaldi
VinayVinay (Salesforce Developers) 
You can reach out to Success - Salesforce Marketing Cloud page on https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000001pQ5CAI for inputs on your ask.

Ramcharan Naidu PalleRamcharan Naidu Palle 
Hi Team,

While working on the "Trailhead data Manager" and refreshing the data it is throwing this error.

"An error occurred in your last data refresh.

Delete failed. First exception on row 0 with id 0015g0000063XmuAAE; first error: DELETE_FAILED, Your attempt to delete Sample Account for Entitlements could not be completed because it is associated with the following entitlements.: Sample Entitlement ...   "

Can anyone help me with this?..

Best Answer chosen by Ramcharan Naidu Palle
AbhishekAbhishek (Salesforce Developers) 

For all the Trailhead issues or Guidance please report it here,



So that our trailhead support engineers will look into it and get back to you.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Salesforce Support.
Glyn Thomas 2Glyn Thomas 2 

Does anyone know if there is a way to pull article views for knowledge base out from the data loader. I'm working on extracting data from salesforce using data factory in azure so we can do MI reporting on it. It looks like this is an installed module in salesforce however and there seems to be an object within it called article views, but I'm unsure as to how I can see that via the data loader, or how I would pull that out of salesforce using the data factory.

Kind Regards

Best Answer chosen by Glyn Thomas 2
AnudeepAnudeep (Salesforce Developers) 
Hi Glyn, 

You can use the following SOQL to extract the article views
SELECT id, ViewCount from KnowledgeArticleViewStat where Channel = 'AllChannels'

I recommend doing a CSV export through workbench before attempting this through data loader

Reference: https://help.salesforce.com/articleView?id=000318928&type=1&mode=1

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Ahmed MediouniAhmed Mediouni 
Hello Community,
I was working on an apex trigger for the account object and opportunity object but there are other objects left for me to create an apex trigger on them, is there any way I can make one single apex trigger that works on all objects?

Best Answer chosen by Ahmed Mediouni
SwethaSwetha (Salesforce Developers) 
HI Ahmed,
>I understand your requirement but you have to create Triggers for each Object, you cannot create just one Trigger for multiple objects. Salesforce only supports “One Trigger per Object” design pattern as a best practice(See https://www.sfdc99.com/2015/01/19/the-one-trigger-per-object-design-pattern/)
>Salesforce permits you to can create a Trigger Handler which each Trigger would invoke and use Dynamic Apex / SObjects to perform generic logic at run-Time.
Also, see https://developer.salesforce.com/forums/?id=906F0000000DBl8IAG

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
fiona gentryfiona gentry 
Hi Pals,

I have Salesforce lightning component which edits a Multi level picklist and then after clicking Save ,This modal is shown up again
User-added image

,Now instead of the same above modal after i click Save ,i would like to redirect to Case List View,

User-added image

I wrote the below code in JS for save Button, but still i see the same Modal screen and not the redirect
  onConfirm:function(component, event, helper){
        var picklist=component.find('ddLevel1');
        var picklistvalue=picklist.get('v.value');
        var picklistdep=component.find('ddLevel2');
        var picklistvaluedep2=picklistdep.get('v.value');
        var picklistoldL1=component.get('v.oldL1');
        var picklistoldL2=component.get('v.oldL2');
        var picklistoldL3=component.get('v.oldL3');
        var ertrecordGuid=component.get('v.ertGUID');
        var picklistdep3=component.find('ddLevel3');
        var picklistvaluedep3=picklistdep3.get('v.value');
        var action = component.get("c.savecasetype");
        action.setParams({  'level1' : picklistvalue,
                          'level2' : component.get('v.secondlevelselected'),
                          'level3' : picklistvaluedep3,
                          'oldlevel1' : picklistoldL1,
                          'oldlevel2' : picklistoldL2,
                          'oldlevel3' : picklistoldL3,
                          'id' : component.get("v.recordId")});
        var toastEvent = $A.get("e.force:showToast");
        action.setCallback(this, function(e) {
                var result=e.getReturnValue();
                        "title": "Success!",
                        "message": "The record has been Upserted  successfully."
                     var urlEvent = $A.get("e.force:navigateToURL");
      "url": "lightning/o/Case/list?filterName=Recent"
                        "title": "Error",
                        "message": "The record has not been Upserted  successfully."

Any help on this is highly appreicated


Best Answer chosen by fiona gentry
SwethaSwetha (Salesforce Developers) 
HI Fiona,
I see that you are using force:navigateToURL  in your code. Instead, can you try force:navigateToList redirect to the Listview by specifying listviewId

Sample code snippet
gotoList : function (component, event, helper) {
    var action = component.get("c.getListViews");
    action.setCallback(this, function(response){
        var state = response.getState();
        if (state === "SUCCESS") {
            var listviews = response.getReturnValue();
            var navEvent = $A.get("e.force:navigateToList");
                "listViewId": listviews.Id,
                "listViewName": null,
                "scope": "Case"
This Apex controller returns list view named "Recently Viewed" for the Case object.
public static List<ListView> getListViews() {
    List<ListView> listviews =
        [SELECT Id, Name FROM ListView WHERE SobjectType = 'Case' and Name='Recently Viewed Cases'];

    // Perform isAccessible() check here
    return listviews;
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Jasmeen Kaur 22Jasmeen Kaur 22 
Hello Experts

I have very basic developing skills but trying to learn more.
I created a trigger in salesforce to detect potential duplicate cases which is working as expected. But I want to apply this trigger to a specific record type. However, at the moment it is working for every record type.

Here is my apex trigger;

trigger DuplicateCase on Case (before insert, before update) {

  for (Case c : Trigger.new) {
       List<Case> cases = [SELECT id, ISClosed, Subject FROM Case WHERE Subject = :c.Subject AND IsClosed = False];
        if (cases.size() > 1) {
            c.Is_Duplicate__c = TRUE;
            c.Is_Duplicate__c = FALSE;

I followed very smiliar posts but no help as such. May be those solutions are not working for me.

The name of record type which I want to use is : Credit Limit Exceeded. 

Can an expert write that for me or suggest me how to write the trigger for any particular record type? 
Looking forward to it.

Thanks in advance.
Best Answer chosen by Jasmeen Kaur 22
ANUTEJANUTEJ (Salesforce Developers) 
Can you try 

RecordType CaseRecordType = [SELECT Id
                                         FROM RecordType
                                         WHERE SobjectType = 'Case' AND Name = 'Credit Limit Exceeded'
                                         LIMIT 1];

and replace if(s.RecordTypeId == recordTypeId) with if(s.RecordTypeId == CaseRecordType.id)

also I would suggest running the above query in query editor to see if the above soql is returning any record in case if there are any errors modify it accordingly.
David Loutzenhiser 2David Loutzenhiser 2 
I want to use code to update some workflow rules.  Can someone tell me which standard object stores workflow rules?
Best Answer chosen by David Loutzenhiser 2
ANUTEJANUTEJ (Salesforce Developers) 
Hi David,

>> https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_workflowrule.htm

As mentioned "Represents a workflow rule that is used to fire off a specific workflow action when the specified criteria is met. Includes access to the associated WorkflowRule object in Salesforce Metadata API."

Also, I would suggest you to look at this link: https://salesforce.stackexchange.com/questions/51384/writing-workflows-in-apex

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Hi ,
Does anyone has any idea as to how to enable the Copyrights /Terms of use of legal notice in lightning 

In the Class , the message is visible at the the bottom of the page in footer -
"Copyright © 2000-2021 salesforce.com, inc. All rights reserved. | Privacy Statement | Security Statement | Terms of Use | 508 Compliance | Go to Salesforce mobile app"

But when we switch to lightning , it disappears . 

Can someone please help me on this?

Best Answer chosen by SN SF
VinayVinay (Salesforce Developers) 
Unfortunately, this feature is not available in lightning.

Kindly review below Idea link and vote for this feature.


Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Sahil Bansal 56Sahil Bansal 56 

In Spring 21 release, Saleforce provided an option to test custom domains on sandbox org which is generally available now according to the following link:

We checked the docs provided by SalesForce for setting up custom domain on Sandbox orgs. There is a step to add the domain on production org first and choose the org with which the domain will be linked. While setting up the custom domain in Production org, there is no field "Associated Org field" for selecting sandbox org. Can anyone please guide us on how we can setup a custom domain on our sandbox org? This is the link which we are following:


Best Answer chosen by Sahil Bansal 56
AbhishekAbhishek (Salesforce Developers) 

I have seen this kind of issue recently.

You have to reach salesforce and mentioned the above query,So that our team has to enable backend permission.

Even without premier support, you raise this request.

This is a Known Issue


There is no workaround at the moment. However, please click "This Issue Affects me" and you will be notified once the issue is fixed

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Salesforce Support.
Best Answer chosen by srikanth yeturu 5
Hii srikanth yeturu
Try the Following Code Just Copy Paste It.
trigger ownerUpdate on Contact (before Update) {
	Set<Id> relatedAccountId = new Set<Id>();
	List<Account> updatedList = new List<Account>();
    string ownerid;
    for(Contact con: trigger.new){
     if(con.AccountId != Null){
       ownerid = con.OwnerId;

    for(Account acc: [Select Id, Name ,OwnerId from Account where id in : relatedAccountId]){
    acc.OwnerId = ownerid;
	update updatedList;
Please Mark It As Best Answer If It Helps.
Thank you...