Hi there,
This time I am posting both the problem and the fix. Before anyone asks why I was creating a node using DAPI.CreateNode() let me assure everyone that I was using llNode.NodeCreate() which is the supported way. I merely isolated the llNode.NodeCreateSubclass() as the place where the problem was occurring. I searched the KC for my error message 'could not create path' in various forums, but none had my problem. I was creating a document object in a standard folder. Only when I did the unthinkable and edited the NodeCreateSubclass() to stick some debug in it, did I stumble upon the problem. My previous node alloc statement was trying to allocate the node with an Undefined name. If development is listening, this should spawn an error as technically your DAPI node should always have at least a name.
In case anyone is wondering what I'm doing (and I'm relaying this because I wouldn't mind hearing how others have gotten around the problem), I'm trying to create a request handler that uploads a document to a drop-box folder. This request handler runs in an AJAX call silently from within a form. The response is a JSON string which gives the DAPI ID of the just created node. This is all a workaround so I can submit a form that triggers a workflow, and be able to script an event to copy or move the just created document into the workflow's attachment folder. This is the critical missing functionality of forms that cause workflows to launch. Incidentally, if anyone else has had to solve this problem, I'd like to know your workaround, and from OT, I'd like to know if there is any out-of-box solution for making the document upload to attachments and the form submission all exist on the same page.
-Hugh Ferguson