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
SF DEVSF DEV 

How to check the format of file when a new attachment is getting inserted

how to check whether the file which is getting inserted is .pdf or .text in trigger

 

 

Santosh SSantosh S

You can check/ enable that while saving in VF Page,  use:

 

<apex:inputFile accept="jpeg, xls, xlsx, doc, docx, txt, pdf" />

 

 

Hope that Helps

SF DEVSF DEV

Thanks for the reply. I got the solution. to using substring function. 

 

 

Thanks Santosh. for reply.