Hi,
1) When you call ContentRepository.Save, it will use the current user name (via PrincipalInfo.Current) for SavedBy/ChangedBy information.
2) To make it appear in new Catalog UI, you must fire proper events so contents will be synched correctly.
From your post I assume you're using a separated application, while to make all thing right you'll need to run it in the context of Commerce site, or at least:
- Set the PrincipalInfo.Current to current user.
- Setup the event configuration, as mentioned here: http://world.episerver.com/documentation/items/tech-notes/episerver-cms-6/episerver-cms-60/event-management-system-specification/
I would suggest to check your code in context of your site, such as a scheduled job to make sure everything run well before continue.
Regards.
/Q
Hi Quan
Sorry for the late reply on this.
I appreciate your feedback - It turns out that I was looking at the wrong code. My bad.
Have a nice day.
/T
Hi guys
I'm creating some commerce content via a Api controller which is called from a third party system. I\m experiencing two problems:
1. When calling ContentRepository.Save(content, SaveAction.Publish, AccessLevel.NoAccess); I get an exception if I don't set the SecurityPrincipal manually first.
2. Even though SaveAction is set to publish, the content is not published. It's visible through the backend catalog browser but I have to publish the content manually.
I've tried pretty much everything.
Where can I try to debug this?
Thanks
/Thomas