Thanks Sven.
I actually tried this again this morning before your post.
There was enhancement added in April 2024 to allow this property to be set by scripting. Thanks Autodesk dev!
If anyone wants to try Sven's (correct) example, there are two problems you may encounter:
- "EffectivityDate for workflow item 2246955 is not editable". Go to Lifecycle Manager, right-click the eg Released box, and ensure that 'effectivity' checkbox is selected.
- "Cannot set past date 2024-xx-xx as effectivity date" - you may have forgotten that month in javascript's Date(yyyy, mm, dd) constructor is zero-based, so 0=Jan, 1=Feb...
Respectfully, to the other poster, please stop this run of posting AI generated nonsense.
We can all paste questions into Co-pilot. You are copying rubbish that doesn't even answer the question, and code examples that wouldn't anyway work.