function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
seahorceseahorce 

Renaming Attachment Files On Insert

One of the processes we use creates a file attachment to an object.  The file name is over 80 characters, so the file type (.pdf) get left off.  This causes an issue when the user tries to open it because they have to either save it locally or select what app to open it with.

 

Just looking for some advice here - what's the best way to resolve this?  Write a trigger on Attachment insert to rename the file and parse out the file type so that it gets included?

Imran MohammedImran Mohammed

A trigger will be a better option for resolving the issue you are into.