SOLVED

importToList C sample code

Go to solution
Anonymous
Not applicable

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
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

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);


View solution in original post

1 REPLY 1
Anonymous
Not applicable

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);