Hi, I would appreciate any help with the following issue. I am trying to create an automated documents creation process using worklfow.
My company has several document templates which I converted into SharePoint content types (created relevant site columns, created template for each CT, inserted Quick Parts controls into it and assigned it to relevant content type).
Then I created the custom list where I configured the columns (same as mentioned content types columns) for the user to fill in one of which being the dropdown - lookup (contains the names of templates=content types and looks up the CT ID and CT columns) in which user can select the template for which he´d like to create the document for. This way when new template is added I just need to create new CT and update the list with corresponding columns as I have done for the existing ones and user will be able to select it and document will be created.
Documents are supposed to be created in document library on the same site which contains mentioned content types.
I then created the workflow (set up to fire when item is created) which uses Web Service call to create selected documents. The reason why am I not using simple create item is that you can´t use variables for Content type and field names with that one and user can select whatever template=Content type which can have whatever fields in it.
Workflow basically does some steps first to get correct SOAP string to use with Web Service UpdateListItems action. The string looks at the end like this (values change based on user input) and it is stored in FinalWebServiceItemCreateStr variable
<Batch OnError="Continue">
<Method ID="1" Cmd="New">
<Field Name='ContentTypeId'>0x010100E89E9E64916F51498E55A40A7F0EDEFE00914168FF378E1A4A844D79D25B29F51A</Field>
<Field Name='LinkFilename'>My Next Order.docx</Field>
<Field Name='UsersNameSurename'>Jan Marek</Field>
<Field Name='WorkPlaceNumber'>876900</Field>
<Field Name='Function'>Purchasing</Field>
<Field Name='KST'>290877</Field>
<Field Name='TelNumber'>800400400</Field>
<Field Name='PCName'>KOPC28905</Field>
<Field Name='ProjectNumber'>I-112233</Field>
<Field Name='ITRequestType'>Standard-Screen</Field>
<Field Name='OrderComment'>OTHER TEST COMMENT</Field>
<Field Name='DevicesType'>New</Field>
<Field Name='OrderRaisedDate'>2017-05-20T22:00:00Z</Field>
</Method>
</Batch>
The web service action is then configured the following way
The workflow runs without error and item is created in mentioned library the content type columns are all filled in correctly with data user entered into the list item. But there is a problem with the item type! It is not a word document! Instead it is the file with .000 extention.
I suspect that it is a problem of incorrectly addressing th Name field in the library in the SOAP string.
<Field Name='LinkFilename'>My Next Order.docx</Field>
But I can´t figure out what field to address instead Or if this is even the root cause of the problem....
Any ideas anyone please?
Many thanx for any sort of answer.
Jan