1 Reply Latest reply on Jun 11, 2013 1:22 PM by 36674

    importToList C sample code

      Hi ... I am trying to find any sample code in C# to make the importToList operation work... 
      Anyone can give me a hint? 

      Thanks
        • Re: importToList C sample code
          In case someone needs it, I managed to write a test code that inserts leads in a list

          var mService = MarketoService;
           
                      var paramsListOperation = new ParamsListOperation()
                      {
                          listKey = new ListKey()
                          {
                              keyType = ListKeyType.MKTOLISTNAME,
                              keyValue = "Test List"
                          },
                          listMemberList = new LeadKey[]
                                  {
                                      new LeadKey()
                                          {
                                              keyType = LeadKeyRef.IDNUM,
                                              keyValue = "12",
                                          },
                                      new LeadKey()
                                          {
                                              keyType = LeadKeyRef.IDNUM,
                                              keyValue = "13",
                                          }
                                  },
                          listOperation = ListOperationType.ADDTOLIST,
           
                      };
           
                      var listOperationResult = mService.ListOperation(paramsListOperation);