Це відео не доступне.
Перепрошуємо.

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...!

КОМЕНТАРІ • 31

  • @goverdhanjayaram3683
    @goverdhanjayaram3683 Рік тому

    Thank you very much !! You have no idea how useful this tutorial is :)

  • @AmanKumar-zi3hx
    @AmanKumar-zi3hx 3 роки тому +1

    My issues resolved. Thanks... It's straight forward and quality contenr

    • @vikasv007
      @vikasv007  3 роки тому

      Excellent and thank you

    • @AmanKumar-zi3hx
      @AmanKumar-zi3hx 3 роки тому

      @@vikasv007 Do you know how to add table of content similar to word in vfp?

    • @vikasv007
      @vikasv007  3 роки тому

      There was a old thread where few were talking about this requirement. developer.salesforce.com/forums/?id=906F0000000994cIAA

  • @kadirali7284
    @kadirali7284 3 роки тому +1

    Thank you for uploading this video

  • @SandeepRahoolPV
    @SandeepRahoolPV 2 роки тому

    NIce

  • @anilpoudel5974
    @anilpoudel5974 2 роки тому

    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.

  • @mohitlalwani3505
    @mohitlalwani3505 Рік тому

    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.

  • @poojamane2634
    @poojamane2634 3 роки тому

    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!

    • @vikasv007
      @vikasv007  3 роки тому +1

      Hiya does this help trailblazers.salesforce.com/answers?id=9063A000000DvybQAC

    • @poojamane2634
      @poojamane2634 3 роки тому

      @@vikasv007 my requirement is when email is triggered that email template should get stored as an attachmemt on quote in pdf format.

  • @demolast4847
    @demolast4847 3 роки тому

    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

    • @vikasv007
      @vikasv007  3 роки тому

      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

  • @akankshac5854
    @akankshac5854 3 роки тому

    Hi . Thanks for the tutorial. Can we attach an audio files .mp4 too like this in salesforce?

    • @vikasv007
      @vikasv007  3 роки тому

      You can surely attach audio files.This might help developer.salesforce.com/forums/?id=906F0000000AW4NIAW

  • @aaadiaries2926
    @aaadiaries2926 3 роки тому

    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

    • @vikasv007
      @vikasv007  3 роки тому +1

      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

  • @mohdimtiazali3865
    @mohdimtiazali3865 3 роки тому

    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

    • @vikasv007
      @vikasv007  3 роки тому +1

      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.

    • @mohdimtiazali3865
      @mohdimtiazali3865 3 роки тому

      @@vikasv007 thank you so much sir i am going to try this

  • @akhilabillakanti3435
    @akhilabillakanti3435 3 роки тому

    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.

    • @vikasv007
      @vikasv007  3 роки тому +1

      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

    • @akhilabillakanti3435
      @akhilabillakanti3435 3 роки тому

      @@vikasv007 Thanks!

  • @user-su9fr9ix4v
    @user-su9fr9ix4v 2 роки тому

    hey, what if i need pdf and do it in quick action

  • @anjalisravanthi3616
    @anjalisravanthi3616 2 роки тому

    Does this works for an image file?

  • @shubhampandey7489
    @shubhampandey7489 2 роки тому

    Hi , I am not able to create content distribution records for content version records .error: insufficient privileges on cross reference fields.

    • @vikasv007
      @vikasv007  2 роки тому

      could be access related issue have a look at access on object

    • @shubhampandey7489
      @shubhampandey7489 2 роки тому

      @@vikasv007 hi. But can't find content distribution object