Need to create a physical object by request.
I have only the name of the object, parent object and RM_Classification id, that completed on the client side using my form. So what else I need to post by request and what the request need to contain.
My code bellow is not working and crashing on "NodeCreateSubclassPre -physicalobjects/PHYSICALOBJECTS/PhysObj LLNodes/PhysicalItems" while it tries to execute MediaType info from database (here: "mtProperties = CAPI.Exec( LLConnect, "SELECT * FROM MediaTypes where MediaTypeID=:A1", \
request.selectedMedia )").
My code:
Object LLnode = $LLIAPI.LLNodeSubsystem.GetItem($TypePhysicalItem_non_Container);
Dynamic parentNode = DAPI.GetNodeByID(.fprgCtx.dSession().fSession, 494489)
.res = LLnode.NodeAlloc(parentNode, 'newName'); //'newName' is just for test
if !.res.ok
return .res;
end
.res = LLnode.NodeCreate(.res.node, parentNode);
if !.res.ok
return .res;
end
retval.physItem = .res.node;
I don't know where I need to use my rm_classification id in order to classify my new physical object and everything else.
Thanks for your answers!