• sunil mali 11
  • NEWBIE
  • 35 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
I've got struck in Step #5 of the automate Opportunities of Superbages

User-added image

I've tried a lot! But couldn't find what is wrong ? Can any one please help or suggest to how to resolve this error.
Thank you.
Hi,

When I am trying to deploy custom object and queue,
I got the following error.

This View Unique Name already exists or has been previously used. Please choose a different name.

When I remove list view from xml file, the error was clear.

If there is another way to solve this error please let me share.
Because I want to retrieve and deploy by automation.

Thank in advance
Regards,
LinThaw
Hello guys!!
I have just started salesforce development.It would be great if you guys can guide me how i can excel in triggers or can you guys provide me some sample programs of triggers
Greetings, I've created my external object for the Data Integration Specalist Superbadge and have configured my external ID as seen below, however, the challenge seems to not pass, indicating that the indirect lookup was not properly created. Here's how I set up the projectRef__c field, which was what I used to push data from the external object into the project object in Salesforce. Are there any steps, I need to take. Hope it helps.
User-added image


User-added image
 
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!