• Ramssf70
  • NEWBIE
  • 158 Points
  • Member since 2016

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 79
    Replies
Is it possible to call an apex class directly from visual force email template to execute some tasks? 
My manager has assigned me a couple badges I must complete on trailhead that requires access to AppExchange. I tried logging a specific AppExchange ticket, but it had many fields I did not relate to.

Hi Folks,
I need to third party soapservice web alesforce.I am confusing where i need to give username and password of third  party system.please help me

//Generated by wsdl2apex

public class PED_SmartinfoWSDL {
    public class DatiClienteType {
        public String Nome;
        public String Cognome;
        public String CodiceFiscale;
        public String RagioneSociale;
        public String PartitaIva;
        public PED_SmartinfoWSDL.IndirizzoType Indirizzo;
        private String[] Nome_type_info = new String[]{'Nome','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] Cognome_type_info = new String[]{'Cognome','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] CodiceFiscale_type_info = new String[]{'CodiceFiscale','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] RagioneSociale_type_info = new String[]{'RagioneSociale','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] PartitaIva_type_info = new String[]{'PartitaIva','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] Indirizzo_type_info = new String[]{'Indirizzo','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Nome','Cognome','CodiceFiscale','RagioneSociale','PartitaIva','Indirizzo'};
    }
    public class ServizioSIRicercaResponse_element {
        public PED_SmartinfoWSDL.EsitoType Esito;
        public PED_SmartinfoWSDL.ArrayOfEsitoRicercaType EsitiRicerca;
        private String[] Esito_type_info = new String[]{'Esito','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] EsitiRicerca_type_info = new String[]{'EsitiRicerca','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Esito','EsitiRicerca'};
    }
    public class ServizioSIGeneraFileRequest_element {
        public String Pod;
        public String SIIdentifier;
        public String NIDIdentifier;
        public String IdUtente;
        public String NomeUtente;
        private String[] Pod_type_info = new String[]{'Pod','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] SIIdentifier_type_info = new String[]{'SIIdentifier','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] NIDIdentifier_type_info = new String[]{'NIDIdentifier','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] IdUtente_type_info = new String[]{'IdUtente','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] NomeUtente_type_info = new String[]{'NomeUtente','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Pod','SIIdentifier','NIDIdentifier','IdUtente','NomeUtente'};
    }
    public class ServizioSIAssociazioneResponse_element {
        public PED_SmartinfoWSDL.EsitoType Esito;
        public String ConfigurazioneSI;
        private String[] Esito_type_info = new String[]{'Esito','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] ConfigurazioneSI_type_info = new String[]{'ConfigurazioneSI','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Esito','ConfigurazioneSI'};
    }
    public class ServizioSIAssociazioneRequest_element {
        public String Pod;
        public String SIIdentifier;
        public String NIDIdentifier;
        public String TipoConfigurazione;
        public String PodPROD;
        public String EneltelPROD;
        public String IdUtente;
        public String NomeUtente;
        private String[] Pod_type_info = new String[]{'Pod','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] SIIdentifier_type_info = new String[]{'SIIdentifier','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] NIDIdentifier_type_info = new String[]{'NIDIdentifier','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] TipoConfigurazione_type_info = new String[]{'TipoConfigurazione','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] PodPROD_type_info = new String[]{'PodPROD','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] EneltelPROD_type_info = new String[]{'EneltelPROD','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] IdUtente_type_info = new String[]{'IdUtente','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] NomeUtente_type_info = new String[]{'NomeUtente','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Pod','SIIdentifier','NIDIdentifier','TipoConfigurazione','PodPROD','EneltelPROD','IdUtente','NomeUtente'};
    }
    public class ServizioSISostituzioneResponse_element {
        public PED_SmartinfoWSDL.EsitoType Esito;
        public String ConfigurazioneSI;
        private String[] Esito_type_info = new String[]{'Esito','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] ConfigurazioneSI_type_info = new String[]{'ConfigurazioneSI','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Esito','ConfigurazioneSI'};
    }
    public class ServizioSIRimozioneRequest_element {
        public String Pod;
        public String Eneltel;
        public String IdUtente;
        public String NomeUtente;
        private String[] Pod_type_info = new String[]{'Pod','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] Eneltel_type_info = new String[]{'Eneltel','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] IdUtente_type_info = new String[]{'IdUtente','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] NomeUtente_type_info = new String[]{'NomeUtente','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Pod','Eneltel','IdUtente','NomeUtente'};
    }
    public class ServizioSIGeneraFileResponse_element {
        public PED_SmartinfoWSDL.EsitoType Esito;
        public String ConfigurazioneSI;
        private String[] Esito_type_info = new String[]{'Esito','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] ConfigurazioneSI_type_info = new String[]{'ConfigurazioneSI','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Esito','ConfigurazioneSI'};
    }
    public class ServizioSIRimozioneResponse_element {
        public PED_SmartinfoWSDL.EsitoType Esito;
        private String[] Esito_type_info = new String[]{'Esito','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Esito'};
    }
    public class ServizioSIRicercaRequest_element {
        public PED_SmartinfoWSDL.DatiFornituraType DatiFornitura;
        public PED_SmartinfoWSDL.DatiAnagraficiType DatiAnagrafici;
        public PED_SmartinfoWSDL.DatiBaseType DatiBase;
        public String IdUtente;
        public String NomeUtente;
        private String[] DatiFornitura_type_info = new String[]{'DatiFornitura','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] DatiAnagrafici_type_info = new String[]{'DatiAnagrafici','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] DatiBase_type_info = new String[]{'DatiBase','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] IdUtente_type_info = new String[]{'IdUtente','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] NomeUtente_type_info = new String[]{'NomeUtente','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'DatiFornitura','DatiAnagrafici','DatiBase','IdUtente','NomeUtente'};
    }
    public class EsitoType {
        public Integer Esito;
        public String Descrizione;
        private String[] Esito_type_info = new String[]{'Esito','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] Descrizione_type_info = new String[]{'Descrizione','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Esito','Descrizione'};
    }
    public class IndirizzoType {
        public String Via;
        public String NumeroCivico;
        public String CAP;
        public String Localita;
        public String CodiceIstat;
        private String[] Via_type_info = new String[]{'Via','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] NumeroCivico_type_info = new String[]{'NumeroCivico','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] CAP_type_info = new String[]{'CAP','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] Localita_type_info = new String[]{'Localita','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] CodiceIstat_type_info = new String[]{'CodiceIstat','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Via','NumeroCivico','CAP','Localita','CodiceIstat'};
    }
    public class DatiBaseType {
        public String Nome;
        public String Cognome;
        public String RagioneSociale;
        public PED_SmartinfoWSDL.IndirizzoType Indirizzo;
        private String[] Nome_type_info = new String[]{'Nome','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] Cognome_type_info = new String[]{'Cognome','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] RagioneSociale_type_info = new String[]{'RagioneSociale','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] Indirizzo_type_info = new String[]{'Indirizzo','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Nome','Cognome','RagioneSociale','Indirizzo'};
    }
    public class FornituraType {
        public String POD;
        public String Eneltel;
        public String Matricola;
        public PED_SmartinfoWSDL.DatiClienteType DatiCliente;
        public String PotenzaContrattuale;
        public String SIIdentifier;
        public String TipoFornitura;
        public String VersoInserzione;
        public String TipoConfigurazione;
        private String[] POD_type_info = new String[]{'POD','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] Eneltel_type_info = new String[]{'Eneltel','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] Matricola_type_info = new String[]{'Matricola','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] DatiCliente_type_info = new String[]{'DatiCliente','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] PotenzaContrattuale_type_info = new String[]{'PotenzaContrattuale','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] SIIdentifier_type_info = new String[]{'SIIdentifier','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] TipoFornitura_type_info = new String[]{'TipoFornitura','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] VersoInserzione_type_info = new String[]{'VersoInserzione','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] TipoConfigurazione_type_info = new String[]{'TipoConfigurazione','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'POD','Eneltel','Matricola','DatiCliente','PotenzaContrattuale','SIIdentifier','TipoFornitura','VersoInserzione','TipoConfigurazione'};
    }
    public class ServizioSISostituzioneRequest_element {
        public String Pod;
        public String SIIdentifier;
        public String NIDIdentifier;
        public String Causale;
        public String IdUtente;
        public String NomeUtente;
        private String[] Pod_type_info = new String[]{'Pod','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] SIIdentifier_type_info = new String[]{'SIIdentifier','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] NIDIdentifier_type_info = new String[]{'NIDIdentifier','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] Causale_type_info = new String[]{'Causale','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] IdUtente_type_info = new String[]{'IdUtente','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] NomeUtente_type_info = new String[]{'NomeUtente','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Pod','SIIdentifier','NIDIdentifier','Causale','IdUtente','NomeUtente'};
    }
    public class ArrayOfEsitoRicercaType {
        public PED_SmartinfoWSDL.EsitoRicercaType[] EsitoRicerca;
        private String[] EsitoRicerca_type_info = new String[]{'EsitoRicerca','http://xmlns.enel.it/wsdl/smartInfo',null,'1','-1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'EsitoRicerca'};
    }
    public class EsitoRicercaType {
        public PED_SmartinfoWSDL.FornituraType Fornitura;
        private String[] Fornitura_type_info = new String[]{'Fornitura','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Fornitura'};
    }
    public class DatiAnagraficiType {
        public String CodiceFiscale;
        public String PartitaIva;
        private String[] CodiceFiscale_type_info = new String[]{'CodiceFiscale','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] PartitaIva_type_info = new String[]{'PartitaIva','http://xmlns.enel.it/wsdl/smartInfo',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'CodiceFiscale','PartitaIva'};
    }
    public class DatiFornituraType {
        public String Pod;
        private String[] Pod_type_info = new String[]{'Pod','http://xmlns.enel.it/wsdl/smartInfo',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo','true','false'};
        private String[] field_order_type_info = new String[]{'Pod'};
    }
    public class ServizioSIRicerca {
     //public String endpoint_x = 'https://smartinfo.risorse.enel:8013/smartInfo/services/ServizioSIRicerca';
      public String endpoint_x = 'https://4ele-collaudo-wssf.enel.it/smartInfo/services/ServizioSIRicerca';
     // public String endpoint_x = 'https://requestb.in/130albk1';
      
  ;
      
      
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
       private String[] ns_map_type_info = new String[]{'http://xmlns.enel.it/wsdl/smartInfo', 'PED_SmartinfoWSDL'};
        
            public PED_SmartinfoWSDL.ServizioSIRicercaResponse_element ServizioSIRicerca(PED_SmartinfoWSDL.DatiFornituraType DatiFornitura,PED_SmartinfoWSDL.DatiAnagraficiType DatiAnagrafici,PED_SmartinfoWSDL.DatiBaseType DatiBase,String IdUtente,String NomeUtente) {
            PED_SmartinfoWSDL.ServizioSIRicercaRequest_element request_x = new PED_SmartinfoWSDL.ServizioSIRicercaRequest_element();
            system.debug('i am wsdl class');
            request_x.DatiFornitura = DatiFornitura;
            request_x.DatiAnagrafici = DatiAnagrafici;
            request_x.DatiBase = DatiBase;
            request_x.IdUtente = IdUtente;
            request_x.NomeUtente = NomeUtente;
            
            system.debug('the value in the reuuest'+request_x);
             system.debug('Endpoint URL'+endpoint_x );
            
            PED_SmartinfoWSDL.ServizioSIRicercaResponse_element response_x;
            Map<String, PED_SmartinfoWSDL.ServizioSIRicercaResponse_element> response_map_x = new Map<String, PED_SmartinfoWSDL.ServizioSIRicercaResponse_element>();
            response_map_x.put('response_x', response_x);
            
            system.debug('the value'+ response_map_x);
           
            
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://xmlns.enel.it/wsdl/smartInfo/ServizioSIRicerca',
              'http://xmlns.enel.it/wsdl/smartInfo',
              'ServizioSIRicercaRequest',
              'http://xmlns.enel.it/wsdl/smartInfo',
              'ServizioSIRicercaResponse',
              'PED_SmartinfoWSDL.ServizioSIRicercaResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x;
        }
    }
}
 
// Custom apex class created me

GLOBAL Class PED_callingsoapservice{
    GLOBAL PED_callingsoapservice()  {
        
        PED_SmartinfoWSDL.DatiBaseType DatiBase =  new PED_SmartinfoWSDL.DatiBaseType();
        PED_SmartinfoWSDL.DatiAnagraficiType DatiAnagrafici = new  PED_SmartinfoWSDL.DatiAnagraficiType();
        DatiAnagrafici.CodiceFiscale='LLLSRG70E09H501O';
        PED_SmartinfoWSDL.DatiFornituraType DatiFornitura = new   PED_SmartinfoWSDL.DatiFornituraType();
        
        DatiFornitura =NULL;
        DatiBase =null;
                
        // PED_SmartinfoWSDL.ServizioSIRicerca obj= new PED_SmartinfoWSDL.ServizioSIRicerca(DatiFornitura , DatiAnagrafici  ,DatiBase ,'TEST','TEST POD');
        PED_SmartinfoWSDL.ServizioSIRicerca obj= new PED_SmartinfoWSDL.ServizioSIRicerca();
        PED_SmartinfoWSDL.ServizioSIRicercaResponse_element res= obj.ServizioSIRicerca(DatiFornitura , DatiAnagrafici  ,DatiBase ,'TEST','TEST POD');
        
        system.debug('Response value'+res);
        
        
        
        
 
    
   }
   }
Hi Folks,
can any one send  display error messages using java script ?
Hi Folks,

Give me some tips for writing test class easily and give me some basic exmaples.

Regards
Ramakrishna
Hi All,

can we migrate console components associated with pagelayout from sandbox to sandbox ?

Regards
Ramakrishna
Hi Guys,

How to migrate case support settings in service cloud? can we migrate using change set  or force.com IDE or Packages?

Regards
Ramakrishna
Hi Guys,

can any one exaplain the simple example on apache kafka on herouku?


Thanks
Hi All,
Can any one explain Thunder platform salesforce IOT?


Thanks
Hi All,
What is health cloud?can we get trail developer account of salesforce health cloud?
Hi All,

can we track the activities of all users in apex?
 
Hi All,
I am  confusing with salesforce license.if i buy one salesforce license in enter prise edition,how many can i assign that License?
Can any one exaplain diffrence between normal data loader and Jitter bit data loader?
Hi Folks,

I want to get failure job record Id's when the batch fails can any one  tell that ?

Hi Folks,

 Need best practises to write test classes for rest classes or connector class .

 

ASAP

Thanks in Advance..!

Hi All,
I have requirement like integrating salesforce to sap throgh informatica.can any one help how to achieve this?
Hello,

I want to fire my  trigger on particular reocrd type only. But i am getting error. 
 Apex trigger QuotelineItemApproval caused an unexpected exception, contact your administrator: QuotelineItemApproval: execution of AfterInsert caused by: System.DmlException: Update failed. First exception on row 0 with id 0Q07E000000dz9aSAA; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3017E0000002lA7. Flow error messages: An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: []: Trigger.QuotelineItemApproval: line 95, column 1  


trigger QuotelineItemApproval on QuoteLineItem (after insert, after update) {

    List<Quote> parentObjList = new List<Quote>();
    List<ID> listIds = new List<ID>();
    List<Quote> listIds1 = new List<Quote>();
    Id devRecordTypeId = Schema.SObjectType.Quote.getRecordTypeInfosByName().get('BenderINC - Industrial Quotes').getRecordTypeId();
    
    if(devRecordTypeId == '012b00000001AxG')
            system.debug('***********+devRecordTypeId +*************'+devRecordTypeId );

  {
    
    Boolean inRange ;
    
    String status  ='Not Required';
    String QuoteID ;
    Boolean isAwaiting = false;
    
    
    for (QuoteLineItem childObj : Trigger.new) {
        if(QuoteID == null) {
             QuoteID  = childObj.QuoteID;
        }    
    }
    
    Boolean changed = false;
    
    if(QuoteID  != null) {
        for(List<QuoteLineItem> items : [select ID, Discount_Flag1__c,Quantity ,Discount  from QuotelineItem where QuoteId= : QuoteID  ]) {
            for(QuoteLineItem item : items ) {
                inRange = false;
                changed  = true;
                if(item.Quantity >= 0 && item.Quantity <= 9 &&  item.Discount <= 0) {
                       inRange = true;
                } else {
                   if(item.Quantity >= 10 && item.Quantity <= 25 &&  item.Discount <= 5) {
                     inRange = true;
                   } else {
                      if(item.Quantity >= 26 && item.Quantity <= 49 &&  item.Discount <= 7) {
                         inRange = true;
                      } else {
                         if(item.Quantity >= 50  &&  item.Discount <= 10) {
                             inRange = true;
                         }
                      }
                   }
                }
                
                if(!inRange) {
                   isAwaiting  = true;              
                }  
                
                system.debug('***********+Quantity +*************'+item.Quantity);
                system.debug('***********+Discount +*************'+item.Discount);
                 
                system.debug('***********+inRange +*************'+inRange );
        
            } 
        } 
        
        
        system.debug('***********+isAwaiting  +*************'+isAwaiting  );
         
        if(changed ) {
           
           Id retVal = null;
           for(ProcessInstanceWorkitem workItem  : [Select p.Id from ProcessInstanceWorkitem p   where p.ProcessInstance.TargetObjectId =: QuoteID]) {
                retVal  =  workItem.Id;
           } 
           
           if(isAwaiting  ) {  
               status = 'Awaiting Approval'; 
           } else {
               status = 'Not Required';           
           }
           
           List<Quote> quotes = [select Id,Approval_Status__c  from Quote where Id =:QuoteID  ]; 
           
           if(quotes.size() > 0) {
               Quote QuoteDetails = quotes[0];
               if(retVal != null && status == 'Not Required') {
                       Approval.ProcessWorkitemRequest req = new Approval.ProcessWorkitemRequest();
                       req.setComments('Automatically approved as Approval is no longer required.'); 
                       req.setAction('Approve');
                       req.setNextApproverIds(new Id[] {UserInfo.getUserId()});  
                       req.setWorkitemId(retVal );    
                       Approval.ProcessResult result =  Approval.process(req);
               } 
                
               
               
           
               //QuoteDetails.IsSynching = false;
               QuoteDetails.Approval_Status__c  = status;
               update QuoteDetails;
           } 
        } 
    }
   
    
  }   
 
}

Thanks & Regards,
Utkarsha
Hi All,

can we migrate console components associated with pagelayout from sandbox to sandbox ?

Regards
Ramakrishna
Hi Guys,

How to migrate case support settings in service cloud? can we migrate using change set  or force.com IDE or Packages?

Regards
Ramakrishna
Hi All,
I am  confusing with salesforce license.if i buy one salesforce license in enter prise edition,how many can i assign that License?
Hello!
I need to make a new apex class from the code below. My goal to execute this code on a monthly basis using "shedule apex" button.
my code is:
list<PersonalGoals__c> AllRecords = new list<PersonalGoals__c>();
AllRecords = [select Id from PersonalGoals__c where Q_check__c = TRUE];
update AllRecords;

Could anyone help? 
Hi, 

I'd like to execute something like this : 

SELECT Id
FROM Opportunity
WHERE OwnerId != Opportunity.Account.OwnerId

Unfortunately, I got this error message. 
MALFORMED_QUERY: 
FROM Opportunity
                ^
ERROR at Row:3:Column:17
Bind variables only allowed in Apex code




Is there a work around ?
I am trying to chain job but the inner class code is not executing.
public class MyQueueable1 implements Queueable {

    Public Static list < Account > acclist = new list < Account > ();
    public MyQueueable1() {

    }
    public void execute(QueueableContext context) {

        System.enqueueJob(new MyQueueable2());
    }
    public class MyQueueable2 implements Queueable {

        public MyQueueable2() {

        }
        public void execute(QueueableContext context) {
            List < Account > a = [SELECT Id, Name
                                  FROM Account WHERE Id =: acclist];
        }
    }
}

 
Is there a way to convert a Lead to Opportunity or Account using a REST API call ?
Hello,

I'm building a VF page which retrieves info from the Order standard object and I have some difficulties to retrieve the information from the Order Products. How can I achieve it?

It seems to me there is no specific standard field in the Order standard object, but searching on the Internet it seems the Order Products are controlled by OrderItem but I don't understand how to retrieve the information to my VF page.



Also I need to create it for my VF page, not just for one specific order (I mean, one order ID), but also for every order it's registered into the system.



Thanks in advance.
Is it possible to call an apex class directly from visual force email template to execute some tasks? 
I have the following Soql call in my controller:

public  with sharing class getAccountContactRelations {

public static list<account> getAccounts() {

  LIST <Account> MemberInfo = [SELECT Id, Name,  (SELECT Id,Contact.Name,Contact.Cardholder_Type__c,Contact.AccountId,
                                             Contact.email,Contact.MailingAddress,Contact.City_Secondary__c,Contact.Zip_Code_Secondary__c,Contact.State_Secondary__c,
                                             Contact.MobilePhone,Account.name
 FROM AccountContactRelations where Contact.Cardholder_Type__c = 'Authorized' Or Contact.Cardholder_Type__c = 'Primary' ) 
 FROM Account WHERE Id = '001M000000xMs8V'];

                                                                                                     
                                                   return MemberInfo;
                                          
                                            }       
                 }



My Visualforce page has the following code:

<apex:page controller="getAccountContactRelations">

<apex:pageblock>
<apex:pageblockTable value="{!Accounts}" var="a"> 
<apex:pageblockTable value="{!a.AccountContactRelations}" var="r">

<apex:column headerValue="City" value="{!r.Contact.City_Secondary__c}"/>

</apex:pageblockTable>
</apex:pageblockTable>

</apex:pageblock>
</apex:page>

The Object has values but they are not being displayed on the Visualforce page.
How should my visualforce page be coded so I can see the results of my subquery?
Thank you

Hi 

 

I have built custom console Component and included it in Case page layout. This Component opens up in sidebar  as per expectation but only when Case is opened in primary tab, when we open the same in Subtab Console Component do not appear. As a result while Chat is being initiated opened Case as a subtab do not show that console Component.

Here I need to Show Custom Console Component within the Subtabs just like Suggested article.

 

Any help regarding this would be highly appreciated.

 

Thanks.