Help with starting workflow with item selected on SQL List form

  • 5 December 2014
  • 1 reply
  • 1 view

Badge

I've setup a SmartObject with a GetList method pulled from SQL Server and have been attempting to use it to start a simple Blackpearl workflow. For a reason I can't identify, I can't use the list's SmartObject to set the Workflow data items. I'm using a SmartForm button to run the view's Create method.

I've checked the listItemClick is working by filling temporary textboxes on the form. I've also confirm that calling the view's Create method does take the selected values and generate a new SmartObject. The workflow just does not seem to recognize the object created by the call to the view's Create method.

 

The only workaround I've found is to have the form contain both the SQL Server GetList view and a standard Create view. I populate the Create view when a list item is clicked on. Then I start the workflow on the Create View's create button click event. I can then fill the workflow data items correctly.

 

This seems like a hacky extra step that I should be able to avoid.

 

Can anyone give me any info on why calling the view's Create method from the Form containing the GetList view would work differently from the Create view's create button?

 

Any and all help greatly appreciated.

 

Thanks.


1 reply

Userlevel 1
Badge +8

Hi Lee

 

Are you trying to start the workflow when the user clicks a "Create" toolbar button on the listview? If so, is the user selecting an existing row, and then you are creating a new SmartObject from the data in the selected row? If this is the case then then what I suggest you try is returning the ID of the newly created SmartObject into a hidden control (e.g. data label) on the form, and then passing that value into the workflow  data field when starting the workflow. In the workflow you can create a reference to the SmartObject you require using this ID data field to a give you access to all the other SmartObject properties.

Reply