+ Start a Discussion
Gino BassoGino Basso 

Problems using ANT to deploy an scontrol with an attached Flex .swf file.

Though neither the retrieve nor the deploy tasks report any errors, the Flex app on the destination instance does not run correctly. On the deployed scontrol I've noticed the following differences (from the source):
1. The filename is different (it uses the name of the scontrol).
2. The filename extension is missing.
3. The binary length is slightly smaller.
Should one be able to deploy such an scontrol using ANT (i.e. using the Force.com Migration Tool)?
Gino BassoGino Basso

Just an update to my original post...

If I delete the scontrol then everything works correctly. More specifically, the binary length matches that of the source (the altered filename and missing extension don't seem to effect matters).

In order to delete the scontrol I had to remove a button that was referencing it (and to do that I had to remove the button from all page layouts that referenced the button). Is it possible this reference (in the button) had something to do with the original issue (though as I stated previously, no errors were reported from the deploy task)?


Gino BassoGino Basso

A further update...

I tried updating an existing scontrol (with an associated/attached Flex .swf) that was not referened anywhere else and got the same result (i.e. the binary length was not correct). It was only after deleting the scontrol that I was able to deply a new version using ANT.

In summation then, it would appear that you cannot use the Force.com Migration Tool (i.e. ANT) to update an existing scontrol that has an associated Flex .swf, even though the ANT task appears run successfully. The workaround is to delete the existing scontrol.beforehand (in which case the deploy task effectively becomes a create rather than an update).