Is there a way to set the CreatedBy for a new discussion or comment
We are looking for a way to create a new comment from a specific user that is not the same as the user in which the API is called from. It would be fine if we could change the createdby after the discussion is created too, I have tried that too with no luck. Here is the code we are trying:
Comment c = new Comment();
c.Text = message;
c.CreatedBy = new User();
c.CreatedBy.Email = "NonAPI@email.com";
Discussion d = new Discussion();
d.Comment = c;
Discussion newD = smartsheet.SheetResources.RowResources.DiscussionResources.CreateDiscussion(123654, 654321, d);
Best Answer
-
Figured it out!! Set the assumed user before creating the comment
smartsheet.AssumedUser = "NonAPI@email.com";
Answers
-
Figured it out!! Set the assumed user before creating the comment
smartsheet.AssumedUser = "NonAPI@email.com";
-
Thanks for posting your solution! Glad you figured it out 😊
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives