• Lorenzo
  • NEWBIE
  • 14 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 4
    Questions
  • 9
    Replies
I write this batch class to update Campaigns with certains criteria and to delete their CAmpaign Member with certains criteria. But is not working! 
global class CampaignMemberDeleteBatch implements Database.Batchable<sObject>{

	

    global Database.QueryLocator start(Database.BatchableContext BC){
    	
    	//return Database.getQueryLocator('Select Id, Status, IsProcessed__c,IsActive,(Select Id,LeadId,ContactId,IsProcessed__c from CampaignMembers) from Campaign Where IsProcessed__c = true AND Status=\'Completed');
        return Database.getQueryLocator('Select Id, Status, IsProcessed__c,IsActive,(Select Id,LeadId,ContactId,IsProcessed__c from CampaignMembers) from Campaign Where IsProcessed__c = true AND Status=\'Completed');
    }

    global void execute(Database.BatchableContext BC,List<Campaign> scope){

	    List<Campaign>campaignToUpdate = new List<Campaign>();
		List<CampaignMember> memberToDelete = new List<CampaignMember>(); 

    	for(Campaign campaign : scope){
    		campaign.IsActive = false;
    		campaignToUpdate.add(campaign);


    		for(CampaignMember member : campaign.campaignMembers){
    			if((member.LeadId!=null || member.ContactID!=null) && member.IsProcessed__c ==true){
    				memberToDelete.add(member);
    			}

    		}
    	
    	}
    	update campaignToUpdate;                          //update IsActive field

    	delete memberToDelete;                            //delete
        Database.emptyRecycleBin(memberToDelete);         //hard delete
    }

    global void finish(Database.BatchableContext BC){
    
        
    }
}
I need to write a Batch class for Campaign members delete. I need to find the campaign member with a relationship with contact/lead associated with Campaign with Completed/Aborted status.
Can i make it with a single query? How can i manage the complex query with Batch class? Thank you for your support
Can you give me some tips to reference a custom report in Lightning component? and how to integrate chart library in lightning?
Hi guys,
Can you exlpain me in which ways can I integrate CloudCraze commerce Platform with Salesforce ?
Thank you
While I am trying to complete Trailhead module for platform events, this is the error message which I am getting.
User-added image

This is the code which I have written as of now,
User-added image
Kindly advise if any changes are required.

Regards
Chetan
Can anyone briefly explain these commerce cloud concepts?
Objective
Datamodel
Editions
Objects
Profiles and roles
Is there a free trial version of commerce cloud available? If yes where can I find it? How can I enable commerce cloud in my Developer Org/sandbox?
Hello,

I am trying to complete the Visualizing Your Data with Dashboards and Charts module for the Reports and Dashboards Trail, and I keep getting this error below even though my Dashboard has all the criteria required. 

Challenge Not yet complete... here's what's wrong: 
One or more of the following is incomplete in the Dashboard: no component uses the 'Cases by Status' report as a source report, your component does not have a 'Cases by Status' header, and/or your component does not have a 'New vs Closed' title.

Below is a screenshot of the dashboard I have created in my Trailhead Playground. 

User-added image
Can anyone help me out here so I can complete this Trail?

Best,

Eric Schmeisser
My issue seems to be very strange. I have created this process and when I test it, it is updating the sales price to deposit amount as said in the requirement. But when the chellenge is checked it gives me error message:
Challenge Not yet complete... here's what's wrong: 
The Fulfillment Cancellation Automation process does not appear to be working properly. Make sure that a cancelled Fulfillment updates the Adventure Package correctly.


Chose the fullfillment object
have proper conditions:
User-added image

and update the adventure package
User-added image

I tested it and it seems to be updating the sales price to the diposit amount correctly:
User-added image

but still on checking Chellenge I get the error:
User-added image

completedly stumped!!! please let me know if anybody faced the same issue. any help.
 
Has anyone completed this trail? I am stomped on challenge number 3, regarding created the process for fulfillment. Any pointers or guidance would be appreciated.
 
Your company sells cylindrical hyperbaric chambers. You need a formula field that calculates the volume of a cylinder for you, rounded to the nearest whole number, given its radius and height. Use the existing mathematical formula for the volume of a cylinder, V = πr2h, where r is the radius of the cylinder, h is the height, and π is the constant Pi. Note: Although this formula field might best be created on a custom object, for simplicity, we’ll create this formula on the Opportunity object.
>Create 2 custom fields of type Number on the Opportunity object: ‘radius’ with a resulting API name of ‘radius__c’ and ‘height’ with a resulting API name of ‘height__c’.
>The formula should be named ‘Cylinder Volume’, with the resulting API name ‘Cylinder_Volume__c‘ and should be created on the Opportunity object.
>The formula should reference the custom fields ‘radius__c‘ and ‘height__c‘.
>The formula should use 3.14159 as an approximation of Pi.

Heres the challenge that im stuck on. i have created the 2 custom fields. What im stuck on is where do we create the formula. Do we put it in the custom fields or is there another place u insert it?

thanks if anyone can help
 

Our app includes a trigger Add_Update_Delete_CampaignMember_Trigger on CampaignMember (after insert, after delete).  It works fine when a camapign member is deleted.  However, when the contact in the campaign is deleted, which also deletes their campaign membership(s), the trigger does not fire.  Is this considered a cascading delete?

 

Does anyone have any ideas for a work around?