Sunday, December 22, 2024
6.5 C
London

Upload Files as Attachment using Apex Salesforce

Files replaced Attachments in Salesforce.  Now any type of document upload becomes part of Files/Content in Salesforce. With all the other advantages over Attachments, the best one is Files can be shared across objects, means having a attachment with multiple parents.

In lightning experience, any attachment upload is uploaded as files after Winter 16.  But in salesforce classic you need to go to files settings and check “Files uploaded to the Attachments related list on records are uploaded as Salesforce Files, not as attachments” to make this happen. From then onwards Attachments will be uploaded as Files from classic too.

We all being uploading attachment in different ways one and of the ways is via Apex. Now how to upload Files as Attachment using Apex ? It is very simple you just need to understand the object relations and thats it.

ContentDocument This object record you don’t create. It gets created when you create Content Version who is child of ContentDocument. But Id of this record will be required to do other stuff.

 

Hot this week

How to Best Providing Dissertation Writing Services

7 Tips for Choosing the Right Dissertation Topic""Navigating the...

The Wedding Dresses: Finding Your Dream Gown

Choosing a wedding dress is one of the most...

Exploring Bangalore’s Real Estate Boom: A Guide to New and Upcoming Projects

Bangalore is a city that is renowned for its...

12 Ways Edge Servers Accelerate Limitless Growth

As new digital frontiers emerge, businesses pursue growth without...

Lab Grown Diamond Bracelets: The Epitome of Ethical Luxury

In the world of luxury accessories, lab grown diamond...

Topics

How to Best Providing Dissertation Writing Services

7 Tips for Choosing the Right Dissertation Topic""Navigating the...

The Wedding Dresses: Finding Your Dream Gown

Choosing a wedding dress is one of the most...

12 Ways Edge Servers Accelerate Limitless Growth

As new digital frontiers emerge, businesses pursue growth without...

Lab Grown Diamond Bracelets: The Epitome of Ethical Luxury

In the world of luxury accessories, lab grown diamond...

The Essential Guide to Choosing the Right Tax Consultant for Your UAE Business

Navigating the complexities of tax laws in the UAE...

How to Choose the Right Car Tinting Service in Dubai

Car tinting is not just about enhancing the appearance...

Related Articles

Popular Categories