• Devin Jacob 5
  • NEWBIE
  • 5 Points
  • Member since 2016
  • Technical Project Manager
  • GiveWell


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 1
    Questions
  • 5
    Replies

For several months I've been using the instructions in this blog post to use Workbench to backup the metadata in my org. Last month, the process stopped working. I assumed it was a one-off oddity and didn't think much of it, but I'm seeing the same errors again this month. Generating the XML "package" containing the metadata I want to export works fine and the process appears to succeed. However when I go to click the download link in Workbench I am told the .zip archive no longer exists. I've uploaded screenshots to show that the ZIP file is generated and the error message displayed when I click the download button. 

I have no idea what I'm doing wrong, and don't believe I've changed anything compared to what I was doing previously, when the backup worked. 

What I see before I click "download"

Error Message

I know there are alternative methods for doing this, such as those discussed here https://developer.salesforce.com/forums/?id=906F0000000BIYzIAO but I am interested in understanding why the method I've been using ceased to work. 

For several months I've been using the instructions in this blog post to use Workbench to backup the metadata in my org. Last month, the process stopped working. I assumed it was a one-off oddity and didn't think much of it, but I'm seeing the same errors again this month. Generating the XML "package" containing the metadata I want to export works fine and the process appears to succeed. However when I go to click the download link in Workbench I am told the .zip archive no longer exists. I've uploaded screenshots to show that the ZIP file is generated and the error message displayed when I click the download button. 

I have no idea what I'm doing wrong, and don't believe I've changed anything compared to what I was doing previously, when the backup worked. 

What I see before I click "download"

Error Message

I know there are alternative methods for doing this, such as those discussed here https://developer.salesforce.com/forums/?id=906F0000000BIYzIAO but I am interested in understanding why the method I've been using ceased to work. 

Hello developer heroes!

I'm working through the Apex modules on Trailhead and can't seem to get past this one: https://developer.salesforce.com/en/trailhead/force_com_programmatic_beginner/apex_triggers/apex_triggers_bulk.

Hopefully this doesn't read like a 'please complete the course for me' kinda post, but I have written a trigger that I believe meets the criteria but it isn't passing the check, so I wanted to seek the guidance of the experts.

The challenge is to do this:

Create an Apex trigger for Opportunity that adds a task to any opportunity set to 'Closed Won'.

To complete this challenge, you need to add a trigger for Opportunity. The trigger will add a task to any opportunity inserted or updated with the stage of 'Closed Won'. The task's subject must be 'Follow Up Test Task'.The Apex trigger must be called 'ClosedOpportunityTrigger'

- With 'ClosedOpportunityTrigger' active, if an opportunity is inserted or updated with a stage of 'Closed Won', it will have a task created with the subject 'Follow Up Test Task'.
- To associate the task with the opportunity, fill the 'WhatId' field with the opportunity ID.
- This challenge specifically tests 200 records in one operation.


And here is the trigger I have come up with, which compiles OK and stands up to a manual (though admittedly unbulkified) test:
trigger ClosedOpportunityTrigger on Opportunity (after insert, after update) {

    List<Task> taskList = new List<Task>();
    
    for (Opportunity opp : [SELECT Id, StageName FROM Opportunity WHERE StageName = 'Closed Won' AND Id IN :Trigger.new]){
                    
            taskList.add(new Task(Subject = 'Follow Up Test Task',
                                  WhatId = opp.Id));
       
    }

    if(taskList.size()>0){
        
        insert taskList;
        
    }
    
}
I have tried replacing the SOQL with a straightforward 'for (Opportunity opp : Trigger.new)' and having the taskList.add inside an IF that checks for Closed Won - no luck. I also thought about checking to see if the stage was being changed to Closed Won, rather than the trigger firing on every edit, but I don't think this is what the module is asking for.

Where do you think I'm going wrong?

Huge thanks in advance!

I'm getting a warning on a project in the IDE:

 

"Project was created in an older version of the Force.com IDE and must be upgraded to be used with Winter '11.  You will not be able to save or refresh files in this project from the server until you upgrade it.  To upgrade, use the upgrade wizard by right-clicking on the project in Package Explorer and choosing Force.com > Upgrade Project. " 

 

1) I've update Eclipse(helios)  to latest Force.com IDE release

2) Right clicking on project does NOT give an option to "upgrade project"

3) Despite the warning,  i am able to save and refresh files from the server

4) I've tried closing project, restarting eclipse and then re-opening project.

 

How do i upgrade this project?

 

Peter

  • December 05, 2010
  • Like
  • 0

Is there a way to perform a "global search" through all Apex code --- classes, triggers, etc.?  For example, if I want to search for a specific block of code but don't remember what class it's in...

  • April 30, 2010
  • Like
  • 0
If your trying to run the latest DataLoader 49.0.0 on a Mac with OS 11 (Big Sur) beta it'll only show you blank windows.
This happens also with other Java Apps using older versions of the Eclipse SWT libraries (and is a known issue).
Can we expect a newer version of Data Loader using the latest Eclipsw SWT libraries in the package?

Thx - Andreas
I am having issues with Creating  an Apex class that returns Account objects for the Mapping.net concepts challenge.  I am a VB and Javascript programmer and I can't seem to get the syntax right.   
public class AccountUtils {
    
    public static void accountsByState(String st){
       List<String> accts = [SELECT Id, Name FROM Account WHERE billingState = :st];
 }
  
}
I believe the first part is correct, but I cannot seem to get a return value.  I am confused by the constructors.  I have tried the documentation but I can't get a return value.  Please help.  I need to get this challenge complete.