1

I'm attempting to use SPServices to create items in a custom list that are of two different custom content types but I can't seem to get it right.

If I don't need to specify the content type of the item I want to add, it woks perfectly so I know my code is essentially good. I'm just not sure how to specify which content type SPServices should create.

Has anyone ever done this before?

2

This was a typo on my part. I was not putting the ContentType field into the pairs array as an array itself.

The right way:

pairs.push(['ContentType', this.get('contentTypeIdName')]);

The wrong way (and how I was doing it):

pairs.push('ContentType', this.get('contentTypeIdName'));
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.