I am creating a publish service and need some information on the naming of publish collections.
I want to prevent the user from naming the collections anything but the name that is on the server. This needs to happen even on creation.
I know I can prevent the renaming by setting disableRenamePublishedCollection = false, but that does not help on the creation.
The best way to do this would to prevent the user from entering a name when they are creating a collection, I have yet to see a way to do this.
If not then need to set the name of the collection to the name that is on the server. I have tried this with no luck. http://forums.adobe.com/thread/662683?tstart=60
I cannot get the name of the collection to change right after it is created. It may change for a second then goes right back.
Anyone have any suggestions?
I thought of maybe making a thread that would wait a time then rename the collection, but I am lost on how to do that.
I don't know if this will help, but:
the catalog:withWriteAccessDo function creates an SQL transaction, and if any error occurs before that function returns the catalog changes are rolled back. Also, no changes take place until that function returns successfully. So try code like:
local sts = LrTasks.pcall( cat.withWriteAccessDo, cat, ..., function()
then check the status...
If the status is good, but the name isn't sticking, then I don't have a clue...