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
ErikssonEriksson 

Compile error: DML not allowed on StaticResource

Is there anybody know how to upload a static resource using web service API or something?

 

I want to dynamically create a static resource using API, but the StaticResource does not support DML Operation. Is there any other way to do that? say Metadata API?

 

Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
shillyershillyer

Yes, you can create a StaticResource using the Metadata API, take a look.

 

Hope that helps,

Sati