PrintTask not working with layer Defintion on Dynamic layers.

Discussion created by calumbutler on Mar 28, 2014
Latest reply on Oct 13, 2015 by greenkarmic
I'm having a problem with the printTask when setting a layerDefinition on a dynamic layer. If I run printTask before a layerDefinition is set the layer appears in the PDF printout, After setting a layerDefinition the layer is missing from the PDF printout.

I've done some digging and editing in Charles with little success. The definition expressions is of the form "STATEABBR IN ('IN','MI','MN','OH')". I've tried using a lower case IN/in but that doesn't seem to be the problem.

I created a js fiddle of the problem , you will see that the printout does not print out the filtered layer, if you remove the the layerDefinition the layer prints fine.