importToList C sample code | Community
Skip to main content
June 11, 2013
Solved

importToList C sample code

  • June 11, 2013
  • 1 reply
  • 816 views
Hi ... I am trying to find any sample code in C# to make the importToList operation work... 
Anyone can give me a hint? 

Thanks
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by
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);


1 reply

Accepted solution
June 11, 2013
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);