How often have you created an object and forgotten to link it to a folder. What typically happens in a situation like this is, the object get linked to the default folder of the user with which you created the object with [You can find the default folder of a user with the default_folder attribute of the dm_user object].
All it takes to link an object to a new folder is three simple steps with API Commands:
1. Link the object to the new [desired] folder. we do this first because its not possible to unlink an object without it having another link.
2. Unlink the object from the old folder.
3. Save the changes, otherwise the whole operation will have no effect.
__________________________________________________________________________________
Here is an Example:
1. Link to a new folder:
link,c,<r_object_d>,/Objects
Where,
r_object_id is the Object ID of the object to be linked
/Objects is the folder
2. Unlink the object from the old folder:
unlink,c,<r_object_id1>,<r_object_id2>
Where,
r_object_id1 is the Object ID of the object to be unlinked
r_object_id2 is the Object ID of the folder to be unlinked
3. Save the operation
save,c,<r_object_id>
Where,
r_object_id is the Object ID of the object that we just Linked and Unlinked.
No comments:
Post a Comment