• SUJAY GANGULY
  • NEWBIE
  • 10 Points
  • Member since 2017
  • Expert Salesforce Developer and Admin
  • salesforcesujay.freetzi.com/Sujay.html


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 19
    Replies
Salesforce Freelance Consultant/Developer/Administrator



Stop wasting your valuable time and money for your Salesforce Projects. I am a Certified Salesforce Developer with the Expert of Apex, Trigger, Lightning Component, and Integration Development at Salesforce. I can give you the solution to your business problem. If any work is assigned to me you can rest assured that, it will be DONE.

Still Now Did: 20+ projects
Happy Clients: 25+
Meetings: 100+
Partners: 10+
Rate: $35/HR

Please take a look at my website first and then let me know, for your current Salesforce requirements.

Website: http://salesforcesujay.freetzi.com/Sujay.html 

E-Mail: sujay.801389@gmail.com
 
Salesforce Freelance Consultant/Developer/Administrator

Stop wasting your valuable time and money for your Salesforce Projects. I am a Certified Salesforce Developer with the Expert of Apex, Trigger, Lightning Component, and Integration Development at Salesforce. I can give you the solution to your business problem. If any work is assigned to me you can rest assured that, it will be DONE.

Still Now Did: 20+ projects
Happy Clients: 25+
Meetings: 100+
Partners: 10+
Rate: $35/HR

Please take a look at my website first and then let me know, for your current Salesforce requirements.

Website: http://salesforcesujay.freetzi.com/Sujay.html 

E-Mail: sujay.801389@gmail.com
 
Salesforce Freelance Consultant/Developer/Administrator

Stop wasting your valuable time and money for your Salesforce Projects. I am a Certified Salesforce Developer with the Expert of Apex, Trigger, Lightning Component, and Integration Development at Salesforce. I can give you the solution to your business problem. If any work is assigned to me you can rest assured that, it will be DONE.

Still Now Did: 20+ projects
Happy Clients: 25+
Meetings: 100+
Partners: 10+
Rate: $35/HR

Please take a look at my website first and then let me know, for your current Salesforce requirements.
Website: http://salesforcesujay.freetzi.com/Sujay.html 
E-Mail: sujay.801389@gmail.com
 
Please help me how to fix it?
I want to add a Payment link in apex single message with two values but when I click the link its not working. Also, I want to add a logo from the static resource.Please tell me how can I do this? I also write my single message code here. acc and opp is the two string value that im taking from account and opportunity and I have to put it in that link.

 List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
                   Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
            
                    String messageBody = '<html><body><br>Hello<br/>'+'Please click the below Pay Now link for make your payment.'+'<a href="http://localhost:50673/payment/Authorize/?+Acc+','+Opp">Pay Now</a>'+'</body></html>';
                    mail.setHtmlBody(messageBody);
                    mail.setSubject('Link');
                    mail.setToAddresses(EmailAddress);
                   // string Url='';
                    mails.add(mail);
                    Messaging.sendEmail(mails); 
Can anyone give me some free video links for Salesforce Lightning and Rest Integration? I complete the trailhead lesson but I want some clear videos.
I want to send a rest request in the 3rd party when account object name is not null and also store the billing address from the response. Please tell me how can I do this?
I am creating a drop-down list in lightning which show 2 lists of events depends on the drop-down list today, PastDay and future value. I am also creating two buttons Next and Previous. which go to the next 2 list of the events and also come back. But im getting an error when im clicking on the Next button. My code and screenshots are below. please tell me how I  solved it.

Drop-down pagefacing error when click on Next button



My Fisrt Component:
<aura:component controller="EventdayClass">
    
    <aura:attribute name="event" type="Event[]"/>
    <aura:attribute name="eventchange" type="String[]"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    
    <aura:attribute name="offset" type="integer"/>
    <aura:attribute name="next" type="boolean"/>
    <aura:attribute name="prev" type="boolean"/>
    
    <lightning:button label="Next" onclick="{!c.next}"/>
    <lightning:button label="Previous" onclick="{!c.prev}"/>
    
     <ui:inputSelect aura:id="levels" change="{!c.onSelectChange}">
        <aura:iteration items="{!v.eventchange}" var="level">
            <ui:inputSelectOption text="{!level}" label="{!level}"/>
        </aura:iteration>
    </ui:inputSelect>
                <aura:iteration items="{!v.event}" var="items">
                    <c:EventDetails eventDetailsList="{!items}"/>
                   </aura:iteration>
    
</aura:component>

Controller class for this component:
({
    
    doInit: function(component,event,helper){
        var eventname=["Today","PastDay","Future"];
        component.set("v.eventchange",eventname);
        
        var action= component.get("c.daycal");
        action.setParams({"DayName":component.find('levels').get("v.value")});
          
        action.setCallback(this,function(response){
            component.set("v.event",response.getReturnValue())
        });
        
        
        $A.enqueueAction(action);


    },
    onSelectChange : function(component, event, helper) {
        var action= component.get("c.daycal");
        action.setParams({"DayName":component.find('levels').get("v.value")});
          
        action.setCallback(this,function(response){
            component.set("v.event",response.getReturnValue())
        });
        //var selected=  component.find('levels').get("v.value");
        
        
        $A.enqueueAction(action);

                     
    },
    
    next:function(component,event,helper){
        var nxt= ture;
        var prv=false;
        var offset=component.get("v.offset");
       // helper.next(component,nxt,prv,offset);
       
    },
    prev:function(component,event,helper){
        var nxt= false;
        var prv=ture;
        var offset=component.get("v.offset");
        helper.next(component,nxt,prv,offset);
    }
    
})

Helper controller class:
({
    next : function(component,nxt,offset) {
        var total= total||0;
         var action= component.get("c.getbtnlist");
        
        action.setParams({
            "next" : next          
        });
         action.setCallback(this,function(response){
             var result = res.getReturnValue();
              cmp.set('v.total',result.totalcount);
             // cmp.set('v.accounts',result.acc);
              cmp.set('v.next',result.hasnext);
             // cmp.set('v.prev',result.hasprev);
             
           // component.set("v.event",response.getReturnValue());
           // component.set('v.next',result.hasnext.hasnext);
        });
       
        
        
        $A.enqueueAction(action);

        
        
    },
    prev : function(component,nxt,total) {
        var total= total ||0;
         var action= component.get("c.getbtnlist");
        
        action.setParams({
            "prev" : prev          
        });
        action.setCallback(this,function(response){
             var result = res.getReturnValue();
              cmp.set('v.total',result.totalcount);
            
             
             cmp.set('v.prev',result.hasprev);
             
           // component.set("v.event",response.getReturnValue());
           // component.set('v.next',result.hasnext.hasnext);
        
         action.setCallback(this,function(response){
            component.set("v.event",response.getReturnValue());
            component.set('v.prev',result.hasprev);
        });
       
        
        
        $A.enqueueAction(action);

        
        
    }
})

Apex class:
public class EventdayClass {
    
    @AuraEnabled
    public static List<Event> daycal(String DayName){
        if(DayName=='Future'){
            return[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime=:System.today() and StartDateTime!=null limit 2];
        
        }
        else if(DayName=='PastDay'){
            return[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime<:System.today() and StartDateTime!=null limit 2];
        }
        else if(DayName=='Today'){
            return[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime>:System.today() and StartDateTime!=null limit 2];
        }
        else{
            return[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime=:System.today() and StartDateTime!=null limit 2];
        }
        
    }
    
    
    //
    //
    //
    
   @AuraEnabled
     public list<event> evn;
      
     @AuraEnabled
     public integer totalcount;
      
     
     @AuraEnabled
     public boolean hasprev;
      
     @AuraEnabled
     public boolean hasnext;
    
    private static integer pagesize=2;
    private static integer total;
   @AuraEnabled
    public static EventdayClass getbtnlist(Boolean next,Boolean prev,decimal off){
        total = (integer)off;
        System.debug('total'+total);
        List<Event> EventList= new List<Event>();
        integer listlenght=[select count() from event where StartDateTime!=null];
        if(next==true && prev==false && (total+pagesize<=listlenght)){
            total=total+pagesize;
            System.debug('total next'+total);
            EventList=[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime!=null limit:pagesize OFFSET:total];
            System.debug('EventList Next'+EventList);
            
        }
        else if(prev==true && total>0){
            total=total-pagesize;
            System.debug('total prev'+total);
            EventList=[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime!=null limit:pagesize OFFSET:total];
            System.debug('EventList prev'+EventList);
        }
        
        EventdayClass ec= new EventdayClass();
        ec.evn=EventList;
        System.debug('ec.evn'+ec.evn);
        ec.totalcount=total;
        System.debug('ec.totalcount'+ec.totalcount);
        ec.hasprev = hasprev(total);   
        System.debug('ec.hasprev'+ec.hasprev);
        ec.hasnext = hasnxt(total,listlenght,pagesize);
        System.debug('ec.hasnext'+ec.hasnext);
        return ec;
       
        
    }
    private static boolean hasprev(integer off){
            if(off>0)
                return false;
            return true; 
        }
        private static boolean hasnxt(integer off,integer li,integer ps){
        if(off+ps<li)
            return false;
        return true;
        }
        
          
    
      
  }
child component that i call in parent componenet:

<aura:component >
    
    <aura:attribute name="eventDetailsList" type="Event"/>
    
    
    
    
   <aura:iteration items="{!v.eventDetailsList}" var="items">
                    <c:Evenlistbtnnn eventbutton="{!items}"/>
   </aura:iteration>
            
                            
        
    
    
    
         
          

   
        
  <table>  
      
                {!v.eventDetailsList.Subject}
               
               <a href="{!'#/sObject/'+v.eventDetailsList.Who.Id+'/view'}">{!v.eventDetailsList.Who.Name}</a>
                <a href="{!'#/sObject/'+v.eventDetailsList.What.Id+'/view'}">{!v.eventDetailsList.What.Name}</a>
                {!v.eventDetailsList.StartDateTime}

             
    </table>
    
    
  
    <!--Next Button-->
    <!--a href="{!'#/sObject/'+v.eventDetailsList.Id+'/view'}">{!v.eventDetailsList.Subject}</a>
    <a href="{!'#/sObject/'+v.eventDetailsList.Who.Id+'/view'}">{!v.eventDetailsList.Who.Name}</a>
    <a href="{!'#/sObject/'+v.eventDetailsList.What.Id+'/view'}">{!v.eventDetailsList.What.Name}</a>
    <a href="{!'#/sObject/'+v.eventDetailsList.RecurrenceStartDateTime.Id+'/view'}">{!v.eventDetailsList.RecurrenceStartDateTime}</a-->
    
    <aura:iteration items="{!v.eventDetailsList}" var="items">
                    <c:Evenlistbtn eventbutton="{!items}"/>
    </aura:iteration>
    
    
    
</aura:component>
The challenge requirements is below:
Mark Item as Packed
Add a button to the campingListItem component that when clicked, marks the item as packed.
Add a button labeled Packed! that calls the packItem controller function when clicked.
The controller action marks the item attribute as packed, updates the item value provider and disables the button.

My Component:

<aura:component >
    <aura:attribute name="item"  type="Camping_Item__c"  /> <!-- required="true" type="String"  -->
    <p> The Item is <ui:outputText value ="{!v.item}"></ui:outputText></p>
    <p>Name:
        <ui:outputText value="{!v.item.name}" /> 
    </p>

    <p>Quantity:
        <ui:outputNumber value="{!v.item.Quantity__c}" /> 
    </p>

    <p>Price:
        <ui:outputCurrency value="{!v.item.Price__c}" /> 
    </p>

    <p>Packed:
        <ui:outputCheckbox value="{!v.item.Packed__c}" /> 
    </p>
    
    <p><ui:button label="Packed!"  press="{!c.packItem}"></ui:button>
    </p>
</aura:component>

My Controller:

({
    packItem : function (component, event, helper)
    {
        var btn = event.getSource();
        var btnMessage = btn.get("v.label");
        component.set("v.item" , btnMessage);
        var btnClicked = event.getSource();
        btnClicked.set("v.disabled" , "TRUE");
    } 
     
})field is updatedBut still getting this error. Please help what should i do?
in account object, if field type picklist value is "prospect", log a call action should show a subject "Call with"  and for another case its remain same as standard log a call. I am unable to understand what I use in this case an action or trigger! please help me with logic and code
in account object, if field type picklist value is "prospect", log a call action should show a subject "Call with"  and for another case its remain same as standard log a call. I am unable to understand what I use in this case an action or trigger! please help me with logic and code

when use sandbox the Regional City URL is update but in production it not update. Please help how i fixed it?
sandbox
production
this is my trigger:


trigger JOBTriger on Job_Application__c (after insert, after update) {
set<id> jobId = new set<id>();
set<id> contId=new set<id>();
for(Job_Application__c p : trigger.new){
      jobId.add(p.Job_Master_JObApplication__c);
      contId.add(p.Contact_Job_application__c);
 }
Map<id,Job__c> mapJobList = new Map<id,Job__c>([select Id,Job_Category__c  from Job__c where Id in : jobId]);
Map<id,Contact>mapcontactList=new Map<id,Contact>([Select ID, Bussiness__c  from Contact where id in :contId]);
List<Contact> updateToContact=new List<Contact>();

for(Job_Application__c j : trigger.new){
      Job__c jobData=new Job__c();
     Contact contData= new Contact();
   
      jobData=mapJobList.get(J.JOB_Master_JObApplication__c);
      contData=mapcontactList.get(j.Contact_Job_application__c);
      
       try{
      if(jobData.Job_Category__c !=null || jobData.Job_Category__c !=''){
        if(jobData.Job_Category__c =='Business Sale-Financial Planing'){
            if(contData.Bussiness__c==null){
              contData.Bussiness__c='Financial Planing Buyer';
              }else{
            contData.Bussiness__c= contData.Bussiness__c+';'+'Financial Planing Buyer';
            }
        
        }
        if(jobData.Job_Category__c =='Business Sale-Accounting'){
        if(contData.Bussiness__c==null){
            contData.Bussiness__c='Accounting Buyer';
            }else{
             contData.Bussiness__c= contData.Bussiness__c+';'+'Accounting Buyer';
             }

        }
        if(jobData.Job_Category__c =='Business Sale-Mortgage'){
        if(contData.Bussiness__c==null){
           contData.Bussiness__c='Mortgage Buyer';
           }else{
              contData.Bussiness__c= contData.Bussiness__c+';'+'Mortgage Buyer';
              }

        }
        if(jobData.Job_Category__c =='Business Sale-Real Estate'){
        if(contData.Bussiness__c==null){
            contData.Bussiness__c='Real Estate Buyer';
            }else{
              contData.Bussiness__c= contData.Bussiness__c+';'+'Real Estate Buyer';
              }

        }
        if(jobData.Job_Category__c =='Business Sale-Legal Firm'){
        if(contData.Bussiness__c==null){
            contData.Bussiness__c='Legal Firm Buyer';
            }else{
              contData.Bussiness__c= contData.Bussiness__c+';'+'Legal Firm Buyer';
              }

        }
        
        
        
          updateToContact.add(contData);
          }
      
      
    
      
      
 
 Upsert updateToContact;
 }
 
 
  catch(Exception e){
      System.debug(e);
      
      }
      }
   
      
  
      }


this is my test class:

@isTest
Public class TestJobApplicationn {

@isTest static void testContactt()
  {
 
          JOB__c j= new JOB__c();
        j.name='Abcc';
        j.Account__c='Jobc';
        j.Job_Category__c='Business Sale-Financial Planing';
       insert j;

 
  TerritoryPostCode__c terri= new TerritoryPostCode__c ();
        terri.Name='1100';
        terri.Main_City__c='Haldia';
        
        insert terri; 

    Contact c= new Contact();
        c.FirstName='Vi';
        c.LastName='dass';
        c.Business_Sales_Status__c='Financial Planing Buyer';
        
       c.PostCode__c=terri.id;
     
       
        insert c;
     
  

    
       Job_Application__c job= new Job_Application__c();
        job.name='TestJobApplications';
        job.Candidate__c='Ajiot ggs';
        job.Candidate_Email__c='ajs@gmail.com';
        job.Job_Title__c='Finance';
        job.Priority__c='Low'; 
        job.Contact_Job_application__c=c.id;
        job.JOB_Master_JObApplication__c=j.id;
         insert job; 
         
    } 
   
      
 }


Its give 63% covarage, but i need atlast 80%. how can i do it?
 
I want to send a rest request in the 3rd party when account object name is not null and also store the billing address from the response. Please tell me how can I do this?
I am creating a drop-down list in lightning which show 2 lists of events depends on the drop-down list today, PastDay and future value. I am also creating two buttons Next and Previous. which go to the next 2 list of the events and also come back. But im getting an error when im clicking on the Next button. My code and screenshots are below. please tell me how I  solved it.

Drop-down pagefacing error when click on Next button



My Fisrt Component:
<aura:component controller="EventdayClass">
    
    <aura:attribute name="event" type="Event[]"/>
    <aura:attribute name="eventchange" type="String[]"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    
    <aura:attribute name="offset" type="integer"/>
    <aura:attribute name="next" type="boolean"/>
    <aura:attribute name="prev" type="boolean"/>
    
    <lightning:button label="Next" onclick="{!c.next}"/>
    <lightning:button label="Previous" onclick="{!c.prev}"/>
    
     <ui:inputSelect aura:id="levels" change="{!c.onSelectChange}">
        <aura:iteration items="{!v.eventchange}" var="level">
            <ui:inputSelectOption text="{!level}" label="{!level}"/>
        </aura:iteration>
    </ui:inputSelect>
                <aura:iteration items="{!v.event}" var="items">
                    <c:EventDetails eventDetailsList="{!items}"/>
                   </aura:iteration>
    
</aura:component>

Controller class for this component:
({
    
    doInit: function(component,event,helper){
        var eventname=["Today","PastDay","Future"];
        component.set("v.eventchange",eventname);
        
        var action= component.get("c.daycal");
        action.setParams({"DayName":component.find('levels').get("v.value")});
          
        action.setCallback(this,function(response){
            component.set("v.event",response.getReturnValue())
        });
        
        
        $A.enqueueAction(action);


    },
    onSelectChange : function(component, event, helper) {
        var action= component.get("c.daycal");
        action.setParams({"DayName":component.find('levels').get("v.value")});
          
        action.setCallback(this,function(response){
            component.set("v.event",response.getReturnValue())
        });
        //var selected=  component.find('levels').get("v.value");
        
        
        $A.enqueueAction(action);

                     
    },
    
    next:function(component,event,helper){
        var nxt= ture;
        var prv=false;
        var offset=component.get("v.offset");
       // helper.next(component,nxt,prv,offset);
       
    },
    prev:function(component,event,helper){
        var nxt= false;
        var prv=ture;
        var offset=component.get("v.offset");
        helper.next(component,nxt,prv,offset);
    }
    
})

Helper controller class:
({
    next : function(component,nxt,offset) {
        var total= total||0;
         var action= component.get("c.getbtnlist");
        
        action.setParams({
            "next" : next          
        });
         action.setCallback(this,function(response){
             var result = res.getReturnValue();
              cmp.set('v.total',result.totalcount);
             // cmp.set('v.accounts',result.acc);
              cmp.set('v.next',result.hasnext);
             // cmp.set('v.prev',result.hasprev);
             
           // component.set("v.event",response.getReturnValue());
           // component.set('v.next',result.hasnext.hasnext);
        });
       
        
        
        $A.enqueueAction(action);

        
        
    },
    prev : function(component,nxt,total) {
        var total= total ||0;
         var action= component.get("c.getbtnlist");
        
        action.setParams({
            "prev" : prev          
        });
        action.setCallback(this,function(response){
             var result = res.getReturnValue();
              cmp.set('v.total',result.totalcount);
            
             
             cmp.set('v.prev',result.hasprev);
             
           // component.set("v.event",response.getReturnValue());
           // component.set('v.next',result.hasnext.hasnext);
        
         action.setCallback(this,function(response){
            component.set("v.event",response.getReturnValue());
            component.set('v.prev',result.hasprev);
        });
       
        
        
        $A.enqueueAction(action);

        
        
    }
})

Apex class:
public class EventdayClass {
    
    @AuraEnabled
    public static List<Event> daycal(String DayName){
        if(DayName=='Future'){
            return[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime=:System.today() and StartDateTime!=null limit 2];
        
        }
        else if(DayName=='PastDay'){
            return[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime<:System.today() and StartDateTime!=null limit 2];
        }
        else if(DayName=='Today'){
            return[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime>:System.today() and StartDateTime!=null limit 2];
        }
        else{
            return[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime=:System.today() and StartDateTime!=null limit 2];
        }
        
    }
    
    
    //
    //
    //
    
   @AuraEnabled
     public list<event> evn;
      
     @AuraEnabled
     public integer totalcount;
      
     
     @AuraEnabled
     public boolean hasprev;
      
     @AuraEnabled
     public boolean hasnext;
    
    private static integer pagesize=2;
    private static integer total;
   @AuraEnabled
    public static EventdayClass getbtnlist(Boolean next,Boolean prev,decimal off){
        total = (integer)off;
        System.debug('total'+total);
        List<Event> EventList= new List<Event>();
        integer listlenght=[select count() from event where StartDateTime!=null];
        if(next==true && prev==false && (total+pagesize<=listlenght)){
            total=total+pagesize;
            System.debug('total next'+total);
            EventList=[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime!=null limit:pagesize OFFSET:total];
            System.debug('EventList Next'+EventList);
            
        }
        else if(prev==true && total>0){
            total=total-pagesize;
            System.debug('total prev'+total);
            EventList=[select id,Subject,StartDateTime,WhoId,WhatId,Who.Name,What.Name from Event where StartDateTime!=null limit:pagesize OFFSET:total];
            System.debug('EventList prev'+EventList);
        }
        
        EventdayClass ec= new EventdayClass();
        ec.evn=EventList;
        System.debug('ec.evn'+ec.evn);
        ec.totalcount=total;
        System.debug('ec.totalcount'+ec.totalcount);
        ec.hasprev = hasprev(total);   
        System.debug('ec.hasprev'+ec.hasprev);
        ec.hasnext = hasnxt(total,listlenght,pagesize);
        System.debug('ec.hasnext'+ec.hasnext);
        return ec;
       
        
    }
    private static boolean hasprev(integer off){
            if(off>0)
                return false;
            return true; 
        }
        private static boolean hasnxt(integer off,integer li,integer ps){
        if(off+ps<li)
            return false;
        return true;
        }
        
          
    
      
  }
child component that i call in parent componenet:

<aura:component >
    
    <aura:attribute name="eventDetailsList" type="Event"/>
    
    
    
    
   <aura:iteration items="{!v.eventDetailsList}" var="items">
                    <c:Evenlistbtnnn eventbutton="{!items}"/>
   </aura:iteration>
            
                            
        
    
    
    
         
          

   
        
  <table>  
      
                {!v.eventDetailsList.Subject}
               
               <a href="{!'#/sObject/'+v.eventDetailsList.Who.Id+'/view'}">{!v.eventDetailsList.Who.Name}</a>
                <a href="{!'#/sObject/'+v.eventDetailsList.What.Id+'/view'}">{!v.eventDetailsList.What.Name}</a>
                {!v.eventDetailsList.StartDateTime}

             
    </table>
    
    
  
    <!--Next Button-->
    <!--a href="{!'#/sObject/'+v.eventDetailsList.Id+'/view'}">{!v.eventDetailsList.Subject}</a>
    <a href="{!'#/sObject/'+v.eventDetailsList.Who.Id+'/view'}">{!v.eventDetailsList.Who.Name}</a>
    <a href="{!'#/sObject/'+v.eventDetailsList.What.Id+'/view'}">{!v.eventDetailsList.What.Name}</a>
    <a href="{!'#/sObject/'+v.eventDetailsList.RecurrenceStartDateTime.Id+'/view'}">{!v.eventDetailsList.RecurrenceStartDateTime}</a-->
    
    <aura:iteration items="{!v.eventDetailsList}" var="items">
                    <c:Evenlistbtn eventbutton="{!items}"/>
    </aura:iteration>
    
    
    
</aura:component>
The challenge requirements is below:
Mark Item as Packed
Add a button to the campingListItem component that when clicked, marks the item as packed.
Add a button labeled Packed! that calls the packItem controller function when clicked.
The controller action marks the item attribute as packed, updates the item value provider and disables the button.

My Component:

<aura:component >
    <aura:attribute name="item"  type="Camping_Item__c"  /> <!-- required="true" type="String"  -->
    <p> The Item is <ui:outputText value ="{!v.item}"></ui:outputText></p>
    <p>Name:
        <ui:outputText value="{!v.item.name}" /> 
    </p>

    <p>Quantity:
        <ui:outputNumber value="{!v.item.Quantity__c}" /> 
    </p>

    <p>Price:
        <ui:outputCurrency value="{!v.item.Price__c}" /> 
    </p>

    <p>Packed:
        <ui:outputCheckbox value="{!v.item.Packed__c}" /> 
    </p>
    
    <p><ui:button label="Packed!"  press="{!c.packItem}"></ui:button>
    </p>
</aura:component>

My Controller:

({
    packItem : function (component, event, helper)
    {
        var btn = event.getSource();
        var btnMessage = btn.get("v.label");
        component.set("v.item" , btnMessage);
        var btnClicked = event.getSource();
        btnClicked.set("v.disabled" , "TRUE");
    } 
     
})field is updatedBut still getting this error. Please help what should i do?
in account object, if field type picklist value is "prospect", log a call action should show a subject "Call with"  and for another case its remain same as standard log a call. I am unable to understand what I use in this case an action or trigger! please help me with logic and code
in account object, if field type picklist value is "prospect", log a call action should show a subject "Call with"  and for another case its remain same as standard log a call. I am unable to understand what I use in this case an action or trigger! please help me with logic and code
this is my trigger:


trigger JOBTriger on Job_Application__c (after insert, after update) {
set<id> jobId = new set<id>();
set<id> contId=new set<id>();
for(Job_Application__c p : trigger.new){
      jobId.add(p.Job_Master_JObApplication__c);
      contId.add(p.Contact_Job_application__c);
 }
Map<id,Job__c> mapJobList = new Map<id,Job__c>([select Id,Job_Category__c  from Job__c where Id in : jobId]);
Map<id,Contact>mapcontactList=new Map<id,Contact>([Select ID, Bussiness__c  from Contact where id in :contId]);
List<Contact> updateToContact=new List<Contact>();

for(Job_Application__c j : trigger.new){
      Job__c jobData=new Job__c();
     Contact contData= new Contact();
   
      jobData=mapJobList.get(J.JOB_Master_JObApplication__c);
      contData=mapcontactList.get(j.Contact_Job_application__c);
      
       try{
      if(jobData.Job_Category__c !=null || jobData.Job_Category__c !=''){
        if(jobData.Job_Category__c =='Business Sale-Financial Planing'){
            if(contData.Bussiness__c==null){
              contData.Bussiness__c='Financial Planing Buyer';
              }else{
            contData.Bussiness__c= contData.Bussiness__c+';'+'Financial Planing Buyer';
            }
        
        }
        if(jobData.Job_Category__c =='Business Sale-Accounting'){
        if(contData.Bussiness__c==null){
            contData.Bussiness__c='Accounting Buyer';
            }else{
             contData.Bussiness__c= contData.Bussiness__c+';'+'Accounting Buyer';
             }

        }
        if(jobData.Job_Category__c =='Business Sale-Mortgage'){
        if(contData.Bussiness__c==null){
           contData.Bussiness__c='Mortgage Buyer';
           }else{
              contData.Bussiness__c= contData.Bussiness__c+';'+'Mortgage Buyer';
              }

        }
        if(jobData.Job_Category__c =='Business Sale-Real Estate'){
        if(contData.Bussiness__c==null){
            contData.Bussiness__c='Real Estate Buyer';
            }else{
              contData.Bussiness__c= contData.Bussiness__c+';'+'Real Estate Buyer';
              }

        }
        if(jobData.Job_Category__c =='Business Sale-Legal Firm'){
        if(contData.Bussiness__c==null){
            contData.Bussiness__c='Legal Firm Buyer';
            }else{
              contData.Bussiness__c= contData.Bussiness__c+';'+'Legal Firm Buyer';
              }

        }
        
        
        
          updateToContact.add(contData);
          }
      
      
    
      
      
 
 Upsert updateToContact;
 }
 
 
  catch(Exception e){
      System.debug(e);
      
      }
      }
   
      
  
      }


this is my test class:

@isTest
Public class TestJobApplicationn {

@isTest static void testContactt()
  {
 
          JOB__c j= new JOB__c();
        j.name='Abcc';
        j.Account__c='Jobc';
        j.Job_Category__c='Business Sale-Financial Planing';
       insert j;

 
  TerritoryPostCode__c terri= new TerritoryPostCode__c ();
        terri.Name='1100';
        terri.Main_City__c='Haldia';
        
        insert terri; 

    Contact c= new Contact();
        c.FirstName='Vi';
        c.LastName='dass';
        c.Business_Sales_Status__c='Financial Planing Buyer';
        
       c.PostCode__c=terri.id;
     
       
        insert c;
     
  

    
       Job_Application__c job= new Job_Application__c();
        job.name='TestJobApplications';
        job.Candidate__c='Ajiot ggs';
        job.Candidate_Email__c='ajs@gmail.com';
        job.Job_Title__c='Finance';
        job.Priority__c='Low'; 
        job.Contact_Job_application__c=c.id;
        job.JOB_Master_JObApplication__c=j.id;
         insert job; 
         
    } 
   
      
 }


Its give 63% covarage, but i need atlast 80%. how can i do it?
 

Displaying Calendar on Visualforce page

  • April 24, 2012
  • Like
  • 0
I'll be doing some SFDC consulting for an old employer of mine and wondered what the going hourly rate would be for the following servies:

- System Administration/Support
- General OnGoing Configuration
- Custom Object Development
- Report Building
- Business Process Analysis & Design
- New SFDC Application Development

I realize the answer to this question could vary based on a number of variables not listed here, but I'm curious to hear the thoughts of those on this job board.

Regards,

John Cannava