Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
CreateObjectEx for creating a task
Mohammed_Abushmais
Hi every body, can any one send me example of adding new task in already defined task list using LAPI, I am trying to use CreateObjectEx in my VB project but I am facing some problems. Thanx in advanced
Find more posts tagged with
Comments
Richard_Boyne_(boyne_(Delete)_891609)
I don't know what the problem is but this may help.(note C-like code is used in the example)A Tasklist is a volume type of container, as is a Project. So, instead of specifying the parent container's Volume and ID parameters:status = LL_CreateObjectEx ( session, parentVOL, parentID, LL_OBJECTTYPE, objSubtype, objName, createInfo, objectInfo );as you would for creating an object within a Folder,you need to do somthing similar to the following:tmpVol = parentID;tmpID = -parentID;status = LL_CreateObjectEx ( session, tmpVol, tmpID, LL_OBJECTTYPE, objSubtype, objName, createInfo, objectInfo );to create a Task within a Tasklist. Where parentID is the Tasklist's object/node/data ID.goodluck
Mohammed_Abushmais
Hi Richard Boyne, let me first thank you for your reply, I have proceed with creating a TaskList, but really I am facing the main problem with creating Task within this task list. I do not know what is the problem, all the code lines returns success result, except LL_CreateObjectEx for creating Task, I will be soo thankfull if u can help me. so I have attached the code that I have wrote inorder to create Task in TaskList called "TaskListTest" create in "Test" folder within EnterPrise workspace. I think the problem in creating ASSOC that pass information about the task, cause all parameters for LL_CreateObjectEx is ok, but createInfo may be the problem. thanx again for ur concern, I appreciate ur kindness, I am waiting ur reply
Richard_Boyne_(boyne_(Delete)_891609)
I am not convinced that "all parameters for LL_CreateObjectEx is ok, but createInfo may be the problem".The function call to create a task within a tasklist from your example is:Status = LL_CreateObjectEx(Session_ID, EnterpriseWS_ID, Object_ID, LL_OBJECTTYPE, LL_TASKSUBTYPE, "Test2", createInfo, objectInfo)where:EnterpriseWS_ID is the object ID for the Enterprise Workspace and is used to specify the parent object's volume ID on this function call.Object_ID is the object ID for the Tasklist and is used to specify the parent object's object ID on this function call.From my previous reply: "A Tasklist is a volume type of container..."You need to create the task object within/under the tasklist's volume. That is, you must specify the tasklist volume as the parent of the Task object when you create the task object.The parentVolID parameter on the CreateObjectEx call must be the volume ID for the tasklist volume, which is the tasklist's object ID.The parentID parameter on the CreateObjectEx call must be the object ID for the tasklist volume, which is the negation of the tasklist's object ID.e.g. from the earlier reply:tmpVol = parentID;tmpID = -parentID;status = LL_CreateObjectEx ( session, tmpVol, tmpID, LL_OBJECTTYPE, objSubtype, objName, createInfo, objectInfo );Where parentID is the Tasklist's object ID."hope this helps.