I am Uplaoding the file in Static Resources in salesforce, it is possible to edit the contents of the file without downloading the file from static Resources and again upload the file

My Static Resource filename - Account.txt

How to access the static resources contents of the file using apex trigger or apex class.

Is it possible?

1 Answer 1


If this a text file then you can update it.

List<StaticResource> docs= [select id, name, body from StaticResource where name = 'Test_Data']; 

and then change body and update the list.

of if you are using Eclipse then in Static resource folder you can update this text file.

  • ok@Tushar sharma, if this is pdf file what we can do?,pdf file not possible ah?
    – user30475
    Feb 7, 2017 at 5:57
  • @cloudcomputinginsalesforce no PDF file is not possible. You need to use Javascript library for that. Feb 7, 2017 at 6:18

You must log in to answer this question.