• Tapas Tulo
  • NEWBIE
  • 40 Points
  • Member since 2015
  • salesforce developer
  • finesse direct IT lab,bangalore

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 15
    Replies
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: HRWHYOAG
Hi ,

I have written a trigger on NOTE ,which will update a checkbox called note_availbale__c on event object.

scenario:
if there is a note the Note_avilable__c should be checked

Here My Code:-
trigger NoteAvilable on Note (after insert,before delete,after update){

   if(trigger.isinsert){
       List<Event> co = New List<event>([select id from Event where id =: Trigger.New[0].ParentId]);
       If(co.size()>0){            
       co[0].Note_Available__c = True;
              update co;        
     }
}

  if(trigger.isdelete){
  List<Event> co = [select id from Event where id =: Trigger.old[0].ParentId];        
   If(co.size()>0){            
   co[0].Note_Available__c = false;            
    update co;        
    }
  }
 }

Its not firing .

Thanks In Advance
Tapas
Hi ,
 
   I have a field called EVENT Date(DATE FIELD) & EVENT FREQUENCY(PICKLIST[value 1 MONTHS,2Months,3Months...12Months etc...]).
REQUIREMENT: if I select any value from the event Frequency that value should be added to  the  event dates month.

EX- event date -10-02-2017
event frequency- 4 months
output would be-10-06-2017

here my code;
 CASE([Opportunity].Event_Frequency__c ,
"1 Month",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+1,day([Opportunity].Event_Date__c)),
"2 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+2,day([Opportunity].Event_Date__c)),
"3 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+3,day([Opportunity].Event_Date__c)),
"4 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+4,day([Opportunity].Event_Date__c)),
"5 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+5,day([Opportunity].Event_Date__c)),
"6 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+6,day([Opportunity].Event_Date__c)),
"7 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+7,day([Opportunity].Event_Date__c)),
"8 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+8,day([Opportunity].Event_Date__c)),
"9 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+9,day([Opportunity].Event_Date__c)),
DATE(year([Opportunity].Event_Date__c)+1,month([Opportunity].Event_Date__c),day([Opportunity].Event_Date__c)))

am not getting the output, there was no syntax error.

Thanks In advance.
 
When the opportunity stage is set to Won or Lost, new opportunity should get created automatically with existing opportunity information For Next year
Ex-EventDate=03/02/2017 than it should be 03/02/2018 for upcoming next year opportunity
 
 here My Code:-
===========================================================*/
public class opportunityTriggerHandler{

    // Method to create future Opportunity while closing oprtunity
    
    public static void opportunityClone(list<Opportunity> opportunityList){
        list<Opportunity> oppLst=[SELECT id,Name,LeadSource,Region__c,StageName,Event_Frequency__c,Event_Date__c, Account.Name FROM Opportunity WHERE ID IN: trigger.new];
        Map<Id,Opportunity> opportunityMapOld = (Map<Id,Opportunity>)Trigger.OldMap; 
        list<Opportunity> OppList= new list<Opportunity>();
        
        for(Opportunity opp: oppLst){
            if(opp.Event_Frequency__c!='0'){
            // check opportunity Stage changed
            if(opp.StageName!=opportunityMapOld.get(Opp.Id).StageName && (Opp.StageName=='Event Won' || Opp.StageName=='Event Lost')){
                Opportunity OppReference= new Opportunity();
                OppReference.Name=opportunityMapOld.get(Opp.Id).Name;
                system.debug('OppAccname'+opp.Account.Name);
                OppReference.Account = opportunityMapOld.get(Opp.Id).Account;
                OppReference.LeadSource=opportunityMapOld.get(Opp.Id).LeadSource;
                OppReference.Status__c ='Open';
                OppReference.Region__c=opportunityMapOld.get(Opp.Id).Region__c;
                OppReference.StageName = '---None---';
                OppReference.Probability = 0;
                OppReference.CloseDate = system.today().addMonths(1);
                if(opp.Event_Date__c!=null){
                    OppReference.Event_Date__c = opportunityMapOld.get(Opp.Id).Event_Date__c;
                }   
                else{
                    OppReference.Event_Date__c =system.today().addMonths(12);
                    //OppReference.closeDate=system.today().addMonths(12);
                }
                OppList.add(OppReference);
                }
            }
        }
        if(!OppList.isEmpty())
        Insert OppList;
    }
    
    public static void ownerChange(list<Opportunity> OppList){
        
        set<string> strRoleName= new set<string>{'Bangalore', 'Mumbai', 'Delhi'};
        list<User> userRecords= [SELECT id, UserRole.Name FROM User WHERE UserRole.Name IN: strRoleName];
        map<string, Id> maoRoleNameandUserId= new map<string, Id>();
        for(user u: userRecords){
            maoRoleNameandUserId.put(u.UserRole.Name, u.id);
        }
        for(opportunity op: OppList){
        if(maoRoleNameandUserId.containsKey(op.Region__c))
            op.OwnerId=maoRoleNameandUserId.get(op.Region__c);
        }
    }
}

Executed Successfully But NOt getting the Result.
It would be great if i get the answer

Thanks&Regards,
Tapas
 
Hi All,
 Help Me out, am completely stuck here since last few days.
I have done everything perfect role, profile, Permission but not able to pass the test method.
here the screenshot.
User-added image
 
Hi All,
am strange to see that, after I installed  Trailhead Security super badge managed package in my org I was trying to run the test execution(as per the instruction given on trailhead) but it keeps on failing.when I opened the class in Developer console I saw only "(Hidden)".

Thanks & Regards!!
Tapas
Hi All,
 Am not able to make my status Successful when run my Test Method...
PFB my screenShot
IUser-added image
Thanks & Regards,
Tapas
Completely stuck in this trailhead challenge.did everything as per the instruction.
still getting the Below error. ...................
==>Challenge Not yet complete... here's what's wrong:  The Sharing Set is not setup with proper Case access. Please check the requirements.
here my screenshot ...User-added imageUser-added imageUser-added image
FYI: i have tried the above in new DE org also

  Thanks In Advance!! 
An account has many opportunity,there is a PickList field on opportunnity  called status(value-approved,rejected,hold).

 Scenario -
  whenever one opportunity status get updated to APPROVED other should be rejected.
  
   Here My Code-
    Apex Class:-
      public class AccountOpty {
  
  List<Account> acctToUpdate = new List<Account>();
  List<Opportunity> opps = new List<Opportunity>(); 
  Set<Id> associatedAccId = new Set<Id>() ;
    public static void findOpty(list<Opportunity> oppList){
        for(opportunity opp:oppList){
        associatedAccId.add(opp.AccountId) ;
        }
       //opps=[select id,AccountId From Opportunity ];
    }//End OF findOpty ethod

}//End Of Class

My Trigger:-
trigger AccountOptyAfterTrigger on Opportunity (after Update) {
    AccountOpty.findOpty(trigger.new);

         }
after executing my apex class am getting the below Error

Error: Compile Error: Variable does not exist: AccountId at line 8 column 29
Login Issue :-when i was trying to connect my DE Org i got This Error :(You are attempting to log into Trailhead to complete challenges with an org that isn't supported. When you are completing Trailhead hands-on challenges, you cannot use a production or sandbox org. You must use a Developer Edition (DE) org to complete Trailhead challenges.
Hi All,
i have perfect vf page in my de org,when i go for check challeng it throws an error AccountList(the vf page ) was not found.
 i have been faced the same in my another challenge too.
 help me out pls.

Thanks & Regards.
Tapas
Hi ,
Hope Your doing good.
 whenever i am trying to write a programme/code in DEV Console am getting this error not only same programme but also the new one that i am trying to save,i encounter the same field intigrity exception.
thanks In Advance
tapas,my error page screen shot
Failed to create createContainerMember for containerId=1dc28000000TnhRAAS: This container member belongs to a container that currently has an unfinished save request with deploymentId=1dr280000038Io9. You may not modify any members in this container until it completes.: Metadata Container ID
Hi ,

I have written a trigger on NOTE ,which will update a checkbox called note_availbale__c on event object.

scenario:
if there is a note the Note_avilable__c should be checked

Here My Code:-
trigger NoteAvilable on Note (after insert,before delete,after update){

   if(trigger.isinsert){
       List<Event> co = New List<event>([select id from Event where id =: Trigger.New[0].ParentId]);
       If(co.size()>0){            
       co[0].Note_Available__c = True;
              update co;        
     }
}

  if(trigger.isdelete){
  List<Event> co = [select id from Event where id =: Trigger.old[0].ParentId];        
   If(co.size()>0){            
   co[0].Note_Available__c = false;            
    update co;        
    }
  }
 }

Its not firing .

Thanks In Advance
Tapas
Hi ,

I have written a trigger on NOTE ,which will update a checkbox called note_availbale__c on event object.

scenario:
if there is a note the Note_avilable__c should be checked

Here My Code:-
trigger NoteAvilable on Note (after insert,before delete,after update){

   if(trigger.isinsert){
       List<Event> co = New List<event>([select id from Event where id =: Trigger.New[0].ParentId]);
       If(co.size()>0){            
       co[0].Note_Available__c = True;
              update co;        
     }
}

  if(trigger.isdelete){
  List<Event> co = [select id from Event where id =: Trigger.old[0].ParentId];        
   If(co.size()>0){            
   co[0].Note_Available__c = false;            
    update co;        
    }
  }
 }

Its not firing .

Thanks In Advance
Tapas
Hi ,
 
   I have a field called EVENT Date(DATE FIELD) & EVENT FREQUENCY(PICKLIST[value 1 MONTHS,2Months,3Months...12Months etc...]).
REQUIREMENT: if I select any value from the event Frequency that value should be added to  the  event dates month.

EX- event date -10-02-2017
event frequency- 4 months
output would be-10-06-2017

here my code;
 CASE([Opportunity].Event_Frequency__c ,
"1 Month",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+1,day([Opportunity].Event_Date__c)),
"2 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+2,day([Opportunity].Event_Date__c)),
"3 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+3,day([Opportunity].Event_Date__c)),
"4 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+4,day([Opportunity].Event_Date__c)),
"5 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+5,day([Opportunity].Event_Date__c)),
"6 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+6,day([Opportunity].Event_Date__c)),
"7 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+7,day([Opportunity].Event_Date__c)),
"8 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+8,day([Opportunity].Event_Date__c)),
"9 Months",DATE(year([Opportunity].Event_Date__c),month([Opportunity].Event_Date__c)+9,day([Opportunity].Event_Date__c)),
DATE(year([Opportunity].Event_Date__c)+1,month([Opportunity].Event_Date__c),day([Opportunity].Event_Date__c)))

am not getting the output, there was no syntax error.

Thanks In advance.
 
Hi All,
 Am not able to make my status Successful when run my Test Method...
PFB my screenShot
IUser-added image
Thanks & Regards,
Tapas
Completely stuck in this trailhead challenge.did everything as per the instruction.
still getting the Below error. ...................
==>Challenge Not yet complete... here's what's wrong:  The Sharing Set is not setup with proper Case access. Please check the requirements.
here my screenshot ...User-added imageUser-added imageUser-added image
FYI: i have tried the above in new DE org also

  Thanks In Advance!! 
An account has many opportunity,there is a PickList field on opportunnity  called status(value-approved,rejected,hold).

 Scenario -
  whenever one opportunity status get updated to APPROVED other should be rejected.
  
   Here My Code-
    Apex Class:-
      public class AccountOpty {
  
  List<Account> acctToUpdate = new List<Account>();
  List<Opportunity> opps = new List<Opportunity>(); 
  Set<Id> associatedAccId = new Set<Id>() ;
    public static void findOpty(list<Opportunity> oppList){
        for(opportunity opp:oppList){
        associatedAccId.add(opp.AccountId) ;
        }
       //opps=[select id,AccountId From Opportunity ];
    }//End OF findOpty ethod

}//End Of Class

My Trigger:-
trigger AccountOptyAfterTrigger on Opportunity (after Update) {
    AccountOpty.findOpty(trigger.new);

         }
after executing my apex class am getting the below Error

Error: Compile Error: Variable does not exist: AccountId at line 8 column 29
Login Issue :-when i was trying to connect my DE Org i got This Error :(You are attempting to log into Trailhead to complete challenges with an org that isn't supported. When you are completing Trailhead hands-on challenges, you cannot use a production or sandbox org. You must use a Developer Edition (DE) org to complete Trailhead challenges.
Hi All,
i have perfect vf page in my de org,when i go for check challeng it throws an error AccountList(the vf page ) was not found.
 i have been faced the same in my another challenge too.
 help me out pls.

Thanks & Regards.
Tapas
Hi ,
Hope Your doing good.
 whenever i am trying to write a programme/code in DEV Console am getting this error not only same programme but also the new one that i am trying to save,i encounter the same field intigrity exception.
thanks In Advance
tapas,my error page screen shot
Failed to create createContainerMember for containerId=1dc28000000TnhRAAS: This container member belongs to a container that currently has an unfinished save request with deploymentId=1dr280000038Io9. You may not modify any members in this container until it completes.: Metadata Container ID