We have been working on python/reportlab scripts to create custom PDF reports of features. Based on the unique id of a record the related signatures and photos are downloaded and attached. The related photos have the same parentglobalid as the globalid of the parent record and can therefore be linked.
Using the objectid of the attachment a specific URL for the photo can be constructed as can be seen below.
The 5 is derived from the objectid, we were assuming the last number would always need to be the same. However if someone uploads an extra photo to a webmap the last number will become 1 higher and not the same anymore as the objectid:
Our question is how we can know the last number?
Too bad we just found out that the last release supports custom reports. Our report works great except for the attached photos described above.