- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2015 11:36 PM
Hello!
We have an issue with a custom app form which contains a referenced image field from another table. The User is seeing Update/Delete options on the image, and wrongly assumes that they apply to simply removing the image from the form, whereas of course deleting is removing the image from its own table.
We wish to remove the update/delete availability from the image when viewed as a reference. We cannot do this through ACLs, as the role in question must be able to achieve these functions when accessing the image in its native table, it is just we wish to restrict them from doing it here. Setting the field as read-only obviously will affect the native table as it is a reference, so is also not an option. We have attempted UI policies and client scripts which work fine on non-referenced fields, but will not work on the referenced image. Currently using Dublin version.
Any suggestions greatly appreciated,
Thanks,
Richard
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 08:57 PM
Okay, try this. 'u_observation' is the table that you want to hide the links from, 'u_plan' is the name of the reference field on that table, and 'u_plan_image' is the name of the image field on the referenced table.
$('edit.u_observation.u_plan.u_plan_image').hide();
If this doesn't work, you can right-click the links in your browser and use a dom inspector to find out what the ID is. This works in Fuji but may be slightly different in Eureka and Dublin.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 11:57 AM
How about this in an onLoad client script?
$('edit.incident.u_citm.icon').hide();
Just change 'incident' to the name of the table that the client script is running on and 'u_citm' to the name of the reference field you've created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 08:45 PM
Hi Mark,
Thanks for your suggestion.
I tried the script:
$('edit.u_observation.u_plan.icon').hide();
where u_observation is the local table name - the form on which the reference image field is sitting, and u_plan is the reference field's name on its own table (u_location).
But unfortunately it had no affect on the ability for a user to update/delete the image through the reference image. I also tried changing the table name to the name of the reference field as well - so edit.u_location.u_plan.icon, but this also had no effect.
Just to explain, the plan field on the left is a local field on this table (u_observation), referencing to the u_location table. The Plan Image on the right is an image reference field pointing directly into the u_location table, and not existing in the local table. (image may have moved off screen to right above, click on image to see full)
Here is the dictionary entry for Plan Image:
Target, as stated, is to remove the update/delete availability when viewed from this form in u_observation (without impacting behaviour on home table)
Thanks,
Richard

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 08:57 PM
Okay, try this. 'u_observation' is the table that you want to hide the links from, 'u_plan' is the name of the reference field on that table, and 'u_plan_image' is the name of the image field on the referenced table.
$('edit.u_observation.u_plan.u_plan_image').hide();
If this doesn't work, you can right-click the links in your browser and use a dom inspector to find out what the ID is. This works in Fuji but may be slightly different in Eureka and Dublin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2015 02:38 AM
Thats the one!
$('edit.u_observation.u_location_name.u_plan').hide();
right clicking and inspecting element on the referenced field gave its full name, then it worked perfectly. Thanks for the help!