2 Replies Latest reply on Mar 6, 2014 12:14 AM by eebe3dc7c9d1d31cd4793c8814dcea8a601352bd

    API- Call

      I am trying to get Lead Changes via the API but with a restricted Attribute list. I’ve put together the following code but it fails when trying to access the attribute list:
       
              ParamsGetMultipleLeads leadRequest = new ParamsGetMultipleLeads();
       
              string[] attr = { "Extended_SF_18_UC_ID__c, Aconex_Key__c, Last_Updated__c" };
              leadRequest.includeAttributes = attr;
       
      .
      .
      .
       
                      ResultGetMultipleLeads resultGetLead = leadResponse.result;
                      LeadRecord[] leadRecs = resultGetLead.leadRecordList;
       
      .
      .
      .
       
                      foreach (LeadRecord leadRecord in leadRecs)
                      {
       
      .
      .
      .
       
                          foreach (SC_097ee0df02084e5aa161064b6c4ef557.csproj.WebReference.Attribute attrib in leadRecord.leadAttributeList)
                          {
       
      .
      .
      .
       
      But it fails when accessing the leadAttributeList.
       
      If I do not apply the filter the code works perfectly.
       
      Can you check with Marketo that I am setting the includAttrutes correctly and that I can still use leadAttributeList to obtain the values of the Attributes requested.
        • Re: API- Call
          Bamah
          You can only extract fields which are in the Fields.xls file that you can export from Admin->Field Management->Export Field Names button.  Please check to see if Extended_SF_18_UC_ID__c, Aconex_Key__c, Last_Updated__c are in your Fields.xls file
          • Re: API- Call
            And if those are supposed to be separate fields / attributes, unless I'm missing something, you'll want to ensure you're instantiating that String array properly, with quotes around each disparate attribute.

            From:

            string[] attr = { "Extended_SF_18_UC_ID__c, Aconex_Key__c, Last_Updated__c" };

            To:

            string[] attr = { "Extended_SF_18_UC_ID__c", "Aconex_Key__c", "Last_Updated__c" };