• Andy S
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Hi All

I'm trying to check a checkbox based on a picklist field value and vice versa, I'm using a VF page with a Standard controller and an extension and some Java Script, I'm relatively new to this so please bear with me. I think I'm heading in the right direction but messing up somewhere along the way.

Please see the code snippets below and advise where I'm going wrong/how can I achieve this? The Quality_Issue__c is the picklist and Quality_Reporting_Only__c is the checkbox that needs to be checked.
Extension class
public class ClientSupportController {
    public Case ClientSupportCase {get;set;}
    public User UserID {get;set;}
    public ApexPages.StandardController controller{get;set;}
    
    
    public ClientSupportController(ApexPages.StandardController controller) {
    
        ClientSupportCase = new Case();
        this.controller = controller; 
}

public PageReference saveClientSupportCase () {
        
        try{upsert (ClientSupportCase);
            
           } catch (System.DmlException e) {
               ApexPages.addMessages(e);
               return null;
           }
        PageReference redirectSuccess = new ApexPages.StandardController(ClientSupportCase).view();
        return (redirectSuccess);
        
    }
    
    public void QualityCheckboxSelction () {
        
        System.debug('>>>>>>>>>');
        if (ClientSupportCase != null) {
            System.debug('ClientSupportCase.QualityIssue >>>>>>>>> ' + ClientSupportCase.Quality_Issue__c);
            if(ClientSupportCase.Quality_Issue__c == 'Yes') {
                ClientSupportCase.Quality_Reporting_Only__c = true ;
            } else if (ClientSupportCase.Quality_Issue__c == 'None') {
                ClientSupportCase.Quality_Reporting_Only__c = false ;
            }
        }
        
    }

}
VF Page :
<apex:page standardController="Case" extensions="ClientSupportController" showHeader="true" sidebar="true" tabStyle="Case"  title="New Case"  >
    
    
    <script type="text/javascript">
    function selectionActionQualityCheckbox(valueCheckQualityReporting) {
                
                if(valueCheckQualityReporting == false) {
                    callMethodQualityCheckbox();
                }
            }
    </script>

<apex:form >
     <apex:pageBlock title="Case Edit" >
      <apex:pageBlockButtons >
      
    <apex:commandButton value="Save" action="{!saveClientSupportCase}" />
                <apex:commandButton value="Cancel"/>
      </apex:pageBlockButtons>
         
      <apex:actionfunction name="callMethodQualityCheckbox" action="{!QualityCheckboxSelction}" reRender="id_SectionSnapshot">  
      </apex:actionFunction>
         
      <apex:actionfunction name="callMethodQualityCheckbox" action="{!QualityCheckboxSelction}"  reRender="IncidentManagement">  
      </apex:actionFunction>   

      <apex:pageBlockSection title="Case Snapshot" id="id_SectionSnapshot">
                <apex:pageblocksectionitem >
                    <apex:outputLabel value="Case Record Type" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:outputField value="{!ClientSupportCase.RecordTypeid}"  />
                </apex:pageblocksectionitem>        
          
                <apex:pageblocksectionitem >
                    <apex:outputLabel value="Case Owner" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:inputField value="{!ClientSupportCase.ownerid}" />
                </apex:pageblocksectionitem>
          
                <apex:pageblocksectionitem >
                    <apex:outputLabel value="Status" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:inputField value="{!ClientSupportCase.Status}"  />
                </apex:pageblocksectionitem>
                
                <apex:pageblocksectionitem >
                    <apex:outputLabel value="Quality Issue" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:inputField value="{!ClientSupportCase.Quality_Issue__c}" onchange="selectionActionQualityCheckbox(this.value)" id="shiva1"/>
                </apex:pageblocksectionitem>
</apex:pageBlockSection> 
          
                
<apex:pageBlockSection title="Incident Management" id="IncidentManagement">
          
                <apex:pageblocksectionitem >   
                    <apex:outputLabel value="Impact" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:inputField value="{!ClientSupportCase.Impact__c}"/>
                </apex:pageblocksectionitem>
          
                <apex:pageblocksectionitem >
                    <apex:outputPanel >
                    <apex:outputLabel value="Quality Reporting - No Assistance Needed" style="font-weight:Bold;padding-right:14px;"  />
                    <apex:inputField value="{!ClientSupportCase.Quality_Reporting_Only__c}" onchange="selectionActionQualityCheckbox(this.value)"/>
                </apex:outputPanel>
                    </apex:pageblocksectionitem>
</apex:pageBlockSection>


 
I have only recently got my hands on the development side of Salesforce. 
So the idea is we need to make callouts using SOAP upon insert of a record. I have already generated the class from the WSDL which I'm pasting below and now I'm kind of stuck as in what is to be done next. I understand I would need to create a trigger for before insert and invoke this webservice class and pass certain parameters/values from that record but I'm not sure how do I go about doing that (since I'm relatively new to the world of Apex) . Would be great if someone can help me out/provide an example of how to invoke the webservice class/what exactly needs to be done. Also, let me know if there's any other details needed from my end.
 
public class pgnet3UsPressganeyComWebservices {
    public class RenewalSetup {
        public String ContractID;
        public String BigMachinesTransactionID;
        public DateTime FromDate;
        public DateTime ToDate;
        public String PriceType;
        public String Increase;
        public String RenewalType;
        public String RenewalBillingCycle;
        public String RenewalBillingOption;
        public String RenewalBillingFrequency;
        private String[] ContractID_type_info = new String[]{'ContractID','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] BigMachinesTransactionID_type_info = new String[]{'BigMachinesTransactionID','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] FromDate_type_info = new String[]{'FromDate','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] ToDate_type_info = new String[]{'ToDate','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] PriceType_type_info = new String[]{'PriceType','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] Increase_type_info = new String[]{'Increase','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] RenewalType_type_info = new String[]{'RenewalType','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] RenewalBillingCycle_type_info = new String[]{'RenewalBillingCycle','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] RenewalBillingOption_type_info = new String[]{'RenewalBillingOption','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] RenewalBillingFrequency_type_info = new String[]{'RenewalBillingFrequency','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'ContractID','BigMachinesTransactionID','FromDate','ToDate','PriceType','Increase','RenewalType','RenewalBillingCycle','RenewalBillingOption','RenewalBillingFrequency'};
    }
    public class ArrayOfResult {
        public pgnet3UsPressganeyComWebservices.Result[] Result;
        private String[] Result_type_info = new String[]{'Result','http://pgnet3.us.pressganey.com/webservices',null,'0','-1','true'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'Result'};
    }
    public class SetADAEntriesResponse_element {
        public pgnet3UsPressganeyComWebservices.ArrayOfResult SetADAEntriesResult;
        private String[] SetADAEntriesResult_type_info = new String[]{'SetADAEntriesResult','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'SetADAEntriesResult'};
    }
    
    public class ArrayOfContractLine {
        public pgnet3UsPressganeyComWebservices.ContractLine[] ContractLine;
        private String[] ContractLine_type_info = new String[]{'ContractLine','http://pgnet3.us.pressganey.com/webservices',null,'0','-1','true'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'ContractLine'};
    }
    public class SetPGContractData_element {
        public pgnet3UsPressganeyComWebservices.Contract ContractDetails;
        private String[] ContractDetails_type_info = new String[]{'ContractDetails','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'ContractDetails'};
    }
    public class SetPGContractDataResponse_element {
        public pgnet3UsPressganeyComWebservices.ArrayOfResult SetPGContractDataResult;
        private String[] SetPGContractDataResult_type_info = new String[]{'SetPGContractDataResult','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'SetPGContractDataResult'};
    }
    public class ADAEntries {
        public DateTime CurrentDate;
        public String ProjectId;
        public Decimal SalesPrice;
        public Decimal Quantity;
        public String Description;
        public String ProjectCategory;
        private String[] CurrentDate_type_info = new String[]{'CurrentDate','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] ProjectId_type_info = new String[]{'ProjectId','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] SalesPrice_type_info = new String[]{'SalesPrice','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] Quantity_type_info = new String[]{'Quantity','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] Description_type_info = new String[]{'Description','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ProjectCategory_type_info = new String[]{'ProjectCategory','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'CurrentDate','ProjectId','SalesPrice','Quantity','Description','ProjectCategory'};
    }
    public class ArrayOfCustomer {
        public pgnet3UsPressganeyComWebservices.Customer[] Customer;
        private String[] Customer_type_info = new String[]{'Customer','http://pgnet3.us.pressganey.com/webservices',null,'0','-1','true'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'Customer'};
    }
    public class SetADAEntries_element {
        public pgnet3UsPressganeyComWebservices.ADAEntries ADAEntriesDetails;
        private String[] ADAEntriesDetails_type_info = new String[]{'ADAEntriesDetails','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'ADAEntriesDetails'};
    }
    public class Result {
        public String ResultCode;
        public String ResultMessage;
        private String[] ResultCode_type_info = new String[]{'ResultCode','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ResultMessage_type_info = new String[]{'ResultMessage','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'ResultCode','ResultMessage'};
    }
    public class ArrayOfRenewalSetup {
        public pgnet3UsPressganeyComWebservices.RenewalSetup[] RenewalSetup;
        private String[] RenewalSetup_type_info = new String[]{'RenewalSetup','http://pgnet3.us.pressganey.com/webservices',null,'0','-1','true'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'RenewalSetup'};
    }
    public class ContractLine {
        public String BaseContractId;
        public String BaseProjId;
        public String BillingFrequency;
        public String Billingcycle;
        public String ContractId;
        public String CurrencyCode;
        public String CustAccount;
        public DateTime EndDate;
        public String InventDimId;
        public String ItemId;
        public Integer NoticeDays;
        public Decimal Price;
        public Decimal PriceUnit;
        public String ProjectStatus;
        public Decimal Qty;
        public Integer ServiceLocation;
        public DateTime StartDate;
        public String BigMachinesTransactionID;
        public String BillingOption;
        public String RenewalType;
        public Decimal AnnualizedContractValue;
        public Decimal IncludedSurveys;
        public Decimal SiteProviders;
        public Decimal BudgetQuantity;
        public Decimal BudgetAmount;
        public Decimal TermValue;
        public String CountOnCancelled;
        public String CountOnProcessed;
        public Integer RevisionNumber;
        public String EngagementNumber;
        public Decimal TotalNumberofEngagement;
        public DateTime ReceiveDate;
        public String IsContractChange;
        public String ModelId;
        private String[] BaseContractId_type_info = new String[]{'BaseContractId','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] BaseProjId_type_info = new String[]{'BaseProjId','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] BillingFrequency_type_info = new String[]{'BillingFrequency','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] Billingcycle_type_info = new String[]{'Billingcycle','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ContractId_type_info = new String[]{'ContractId','http://pgnet3.us.pressganey.com/webservices',null,'1','1','true'};
        private String[] CurrencyCode_type_info = new String[]{'CurrencyCode','http://pgnet3.us.pressganey.com/webservices',null,'1','1','true'};
        private String[] CustAccount_type_info = new String[]{'CustAccount','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] EndDate_type_info = new String[]{'EndDate','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] InventDimId_type_info = new String[]{'InventDimId','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ItemId_type_info = new String[]{'ItemId','http://pgnet3.us.pressganey.com/webservices',null,'1','1','true'};
        private String[] NoticeDays_type_info = new String[]{'NoticeDays','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] Price_type_info = new String[]{'Price','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] PriceUnit_type_info = new String[]{'PriceUnit','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] ProjectStatus_type_info = new String[]{'ProjectStatus','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] Qty_type_info = new String[]{'Qty','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] ServiceLocation_type_info = new String[]{'ServiceLocation','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] StartDate_type_info = new String[]{'StartDate','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] BigMachinesTransactionID_type_info = new String[]{'BigMachinesTransactionID','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] BillingOption_type_info = new String[]{'BillingOption','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] RenewalType_type_info = new String[]{'RenewalType','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] AnnualizedContractValue_type_info = new String[]{'AnnualizedContractValue','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] IncludedSurveys_type_info = new String[]{'IncludedSurveys','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] SiteProviders_type_info = new String[]{'SiteProviders','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] BudgetQuantity_type_info = new String[]{'BudgetQuantity','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] BudgetAmount_type_info = new String[]{'BudgetAmount','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] TermValue_type_info = new String[]{'TermValue','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] CountOnCancelled_type_info = new String[]{'CountOnCancelled','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] CountOnProcessed_type_info = new String[]{'CountOnProcessed','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] RevisionNumber_type_info = new String[]{'RevisionNumber','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] EngagementNumber_type_info = new String[]{'EngagementNumber','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] TotalNumberofEngagement_type_info = new String[]{'TotalNumberofEngagement','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] ReceiveDate_type_info = new String[]{'ReceiveDate','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] IsContractChange_type_info = new String[]{'IsContractChange','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ModelId_type_info = new String[]{'ModelId','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'BaseContractId','BaseProjId','BillingFrequency','Billingcycle','ContractId','CurrencyCode','CustAccount','EndDate','InventDimId','ItemId','NoticeDays','Price','PriceUnit','ProjectStatus','Qty','ServiceLocation','StartDate','BigMachinesTransactionID','BillingOption','RenewalType','AnnualizedContractValue','IncludedSurveys','SiteProviders','BudgetQuantity','BudgetAmount','TermValue','CountOnCancelled','CountOnProcessed','RevisionNumber','EngagementNumber','TotalNumberofEngagement','ReceiveDate','IsContractChange','ModelId'};
    }
    public class Contract {
        public String BaseContractId;
        public String ContractDescription;
        public String ContractId;
        public String ContractURL;
        public String ContractStatus;
        public String Currency_x;
        public String Custaccount;
        public String Email;
        public DateTime EndDate;
        public String FirstName;
        public String LastName;
        public String Phone;
        public DateTime StartDate;
        public String BigMachinesTransactionID;
        public String ContractGroupID;
        public String CustomerName;
        public String ParentCustomerID;
        public String Addendum;
        public Integer RevisionNumber;
        public Integer NoticeDays;
        public String RenewalType;
        public DateTime ReceiveDate;
        public String IsContractChange;
        public pgnet3UsPressganeyComWebservices.ArrayOfContractLine ContractLineDetails;
        public pgnet3UsPressganeyComWebservices.ArrayOfRenewalSetup RenewalSetupDetails;
        public pgnet3UsPressganeyComWebservices.ArrayOfCustomer CustomerDetails;
        private String[] BaseContractId_type_info = new String[]{'BaseContractId','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ContractDescription_type_info = new String[]{'ContractDescription','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ContractId_type_info = new String[]{'ContractId','http://pgnet3.us.pressganey.com/webservices',null,'1','1','true'};
        private String[] ContractURL_type_info = new String[]{'ContractURL','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ContractStatus_type_info = new String[]{'ContractStatus','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] Currency_x_type_info = new String[]{'Currency','http://pgnet3.us.pressganey.com/webservices',null,'1','1','true'};
        private String[] Custaccount_type_info = new String[]{'Custaccount','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] Email_type_info = new String[]{'Email','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] EndDate_type_info = new String[]{'EndDate','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] FirstName_type_info = new String[]{'FirstName','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] LastName_type_info = new String[]{'LastName','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] Phone_type_info = new String[]{'Phone','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] StartDate_type_info = new String[]{'StartDate','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] BigMachinesTransactionID_type_info = new String[]{'BigMachinesTransactionID','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ContractGroupID_type_info = new String[]{'ContractGroupID','http://pgnet3.us.pressganey.com/webservices',null,'1','1','true'};
        private String[] CustomerName_type_info = new String[]{'CustomerName','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ParentCustomerID_type_info = new String[]{'ParentCustomerID','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] Addendum_type_info = new String[]{'Addendum','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] RevisionNumber_type_info = new String[]{'RevisionNumber','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] NoticeDays_type_info = new String[]{'NoticeDays','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] RenewalType_type_info = new String[]{'RenewalType','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ReceiveDate_type_info = new String[]{'ReceiveDate','http://pgnet3.us.pressganey.com/webservices',null,'1','1','false'};
        private String[] IsContractChange_type_info = new String[]{'IsContractChange','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] ContractLineDetails_type_info = new String[]{'ContractLineDetails','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] RenewalSetupDetails_type_info = new String[]{'RenewalSetupDetails','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] CustomerDetails_type_info = new String[]{'CustomerDetails','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'BaseContractId','ContractDescription','ContractId','ContractURL','ContractStatus','Currency_x','Custaccount','Email','EndDate','FirstName','LastName','Phone','StartDate','BigMachinesTransactionID','ContractGroupID','CustomerName','ParentCustomerID','Addendum','RevisionNumber','NoticeDays','RenewalType','ReceiveDate','IsContractChange','ContractLineDetails','RenewalSetupDetails','CustomerDetails'};
    }
    public class MyHeader {
        public String UserName;
        public String Password;
        private String[] UserName_type_info = new String[]{'UserName','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] Password_type_info = new String[]{'Password','http://pgnet3.us.pressganey.com/webservices',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices','true','false'};
        private String[] field_order_type_info = new String[]{'UserName','Password'};
    }
    public class AXBMIntegrationWSSoap {
        public String endpoint_x = 'http://sbn1q-qa2ax1v:81/AXBMIntegrationWS/AXBMIntegrationWS.asmx';
        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;
        public pgnet3UsPressganeyComWebservices.MyHeader MyHeader;
        private String MyHeader_hns = 'MyHeader=http://pgnet3.us.pressganey.com/webservices';
        private String[] ns_map_type_info = new String[]{'http://pgnet3.us.pressganey.com/webservices', 'pgnet3UsPressganeyComWebservices'};
        public pgnet3UsPressganeyComWebservices.ArrayOfResult SetPGContractData(pgnet3UsPressganeyComWebservices.Contract ContractDetails) {
            pgnet3UsPressganeyComWebservices.SetPGContractData_element request_x = new pgnet3UsPressganeyComWebservices.SetPGContractData_element();
            request_x.ContractDetails = ContractDetails;
            pgnet3UsPressganeyComWebservices.SetPGContractDataResponse_element response_x;
            Map<String, pgnet3UsPressganeyComWebservices.SetPGContractDataResponse_element> response_map_x = new Map<String, pgnet3UsPressganeyComWebservices.SetPGContractDataResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://pgnet3.us.pressganey.com/webservices/SetPGContractData',
              'http://pgnet3.us.pressganey.com/webservices',
              'SetPGContractData',
              'http://pgnet3.us.pressganey.com/webservices',
              'SetPGContractDataResponse',
              'pgnet3UsPressganeyComWebservices.SetPGContractDataResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.SetPGContractDataResult;
        }
        public pgnet3UsPressganeyComWebservices.ArrayOfResult SetADAEntries(pgnet3UsPressganeyComWebservices.ADAEntries ADAEntriesDetails) {
            pgnet3UsPressganeyComWebservices.SetADAEntries_element request_x = new pgnet3UsPressganeyComWebservices.SetADAEntries_element();
            request_x.ADAEntriesDetails = ADAEntriesDetails;
            pgnet3UsPressganeyComWebservices.SetADAEntriesResponse_element response_x;
            Map<String, pgnet3UsPressganeyComWebservices.SetADAEntriesResponse_element> response_map_x = new Map<String, pgnet3UsPressganeyComWebservices.SetADAEntriesResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://pgnet3.us.pressganey.com/webservices/SetADAEntries',
              'http://pgnet3.us.pressganey.com/webservices',
              'SetADAEntries',
              'http://pgnet3.us.pressganey.com/webservices',
              'SetADAEntriesResponse',
              'pgnet3UsPressganeyComWebservices.SetADAEntriesResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.SetADAEntriesResult;
        }
    }
}

Also, we are interested in the ADA entries method only
 
  • March 25, 2016
  • Like
  • 0
Hi

I am trying to write a trigger and update bidder number field on Bidder object from Bidder number field on Campaign Member Object. I am getting the following error with the below trigger

Error : Initial term of field expression must be a concrete SObject: List<CampaignMember>

trigger sj_BidderUpdate on sj_Bidder__c (after insert) {
set<ID>campmember = new set <ID> ();
for (sj_Bidder__c bid : Trigger.new  )
    CampMember.add (bid.ID);
   
    list<campaignmember> CM = [select ID, sj_Bidder_Number__c from campaignmember];
    list<sj_Bidder__c> BD = new list <sj_Bidder__c> ();
   
    for ( campaignmember Cmem : CM){
        for (sj_Bidder__c bdr : CM.campaignmember__r){
           
            bdr.sj_Bidder_Number__c = CM.sj_Bidder_Number__c;
            BD.add(bdr);
        }
    }
   
   
}
Can you please help me out with this API error.I am unable to complete the training