2

I am trying to create new tridion user using Anguilla framework. I tried, but the user is not getting saved. When I'm saving the user, it's saying "cannot save item; paramer s is null". Below is my code :

var newuser = $models.createNewItem($const.ItemType.USER);
newuser.setTitle("Test Title");
newuser.setDescription("Test description");
newuser.Privileges(1);
newuser.save(true);

I am getting an error saying "cannot save item; paramer s is null". But I'm struggling to find out which parameter I missed out. Can someone please guide me how to do that? If it is because I'm not setting the Membership of the user, can someone tell me how to set the membership of a user?

  • Abu, I am not a Anguilla expert so could be difficult to help you with the code. But Peter has developed a pretty cool Alchemy Plugin for it, it could be useful for you. alchemywebstore.com/plugins/56619c3be4de021388dc465d – Saurabh Gangwar Mar 9 '16 at 18:44
  • Priviledges seems to be misspelled; should be Privileges – Rick Pannekoek Mar 10 '16 at 8:28
  • Corrected, but in my code the spelling is correct – Abu Zar Mar 11 '16 at 6:43
-1

Can you try it with a valid domain and username in your code? something like below:

newuser.setTitle("MyDomain\MyUserName");
  • I am passing valid user name only, I have replaced the actual values with dummy strings in the code which I pasted here. – Abu Zar Mar 9 '16 at 19:32

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.