Це відео не доступне.
Перепрошуємо.
File attachment using Apex
Вставка
- Опубліковано 26 чер 2020
- This tutorial will teach you to create a text file and attach it to contact object via Apex.
ContentVersion Information
developer.sale...
ContentDocumentLink information
developer.sale...!
Thank you very much !! You have no idea how useful this tutorial is :)
My issues resolved. Thanks... It's straight forward and quality contenr
Excellent and thank you
@@vikasv007 Do you know how to add table of content similar to word in vfp?
There was a old thread where few were talking about this requirement. developer.salesforce.com/forums/?id=906F0000000994cIAA
Thank you for uploading this video
You are welcome
NIce
Sir suppose I have AL3 file in my desktop and I need to convert that format and read using third party API how I will upload file in that API and retrieve that file in particular format without the use of any object just normally passing desktop file.
please reply on it
Thank you so much Can you help me how to upload a file from external source.With the help of only apex not VF. Because VF i am not using.
Woww! Amazing video . Very straight forward , short and simple. I juss have one concern ...how can we put a data into this pdf in html format and display field's information in that pdf. It would be really greatful if i will get an answer. Thanks in advance!
Hiya does this help trailblazers.salesforce.com/answers?id=9063A000000DvybQAC
@@vikasv007 my requirement is when email is triggered that email template should get stored as an attachmemt on quote in pdf format.
Nice and simple. Appreciate it! How can I send a file using rest api from salesforce to 3rd party? Do I have to send the body or any specific format of file? Thanks
You have to send as body something like EncodingUtil.base64Encode(FileData) in your HttpRequest. Also please make sure you set header something like Content-Disposition: form-data; name="file". You can get more info from developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
Hi . Thanks for the tutorial. Can we attach an audio files .mp4 too like this in salesforce?
You can surely attach audio files.This might help developer.salesforce.com/forums/?id=906F0000000AW4NIAW
Hi..thank you for amazing tutorial.. can you please let me know how to query content document object for linked attachments of an object? I am getting null results when I query through apex but not through query editor
Hi there you can use this query SELECT ContentDocumentId,LinkedEntityId FROM ContentDocumentLink where linkedEntityid = :id where id is the id of the object where you have attachment it could be contact ,account or what ever. Once you have contentdocumentid you can query contentversion object with the above contentdocmentid to get title or other info. Hope that helps
send attachments from contact to opportunity when account of contact and account of opportunity is equall???please help
please help in this answer using list set or map only
you can tell manually also
If I understood correctly You are after attaching doc to opportunity object? And Perhaps trigger is Contact record I presume? There are multiple Opportunities for same account? So how are you going to decide which opportunity you are after. Let say Contact C has Account A which has say 5 opportunity. If you know which Opportunity then it is easy to do. First Load account and Opportunity to collection perhaps Map keeping Account as key something like this Map When you trigger contact compare the account of contact with id of Map by checking if ID exisit if it does get the right opportunity id and pass it as LinkedEntityId of ContentDocumentLink object.
@@vikasv007 thank you so much sir i am going to try this
Hey, Is it possible to give the path of the local file and get the file inserted into attachment object using apex? However, I see this is possible using dataloader, where we can just give the path for attachment body.
There were few discussion about it on Stack overflow. Have a look at this one. Hope this will help salesforce.stackexchange.com/questions/180120/attach-a-file-from-local-system-to-salesforce-using-apex/180126
@@vikasv007 Thanks!
hey, what if i need pdf and do it in quick action
Does this works for an image file?
Hi , I am not able to create content distribution records for content version records .error: insufficient privileges on cross reference fields.
could be access related issue have a look at access on object
@@vikasv007 hi. But can't find content distribution object