How to Generate and Store file in Salesforce Using Apex (Content Version & Document) ? - Salesforce

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ธ.ค. 2021
  • In this video we will learn about Content Version & Content Document and how can we generate and store files inside salesforce
    Like | Share | Subscribe | Spread Knowledge
    ________________________________________________________________________
    Follow Me:
    Facebook: / shubham.lashkan
    Instagram: / shubhamlashkan
    Twitter: / shubhamlashkan
    #ShubhamLashkan #Salesforce #Apex #Trailhead #CRM #ApexDevelopment #salesforcehulk #salesforcedeveloper #salesforcedevelopment #howto
    #contentverison #contentdocument #salesforcetraining #salesforcetutorials

ความคิดเห็น • 31

  • @rajatmehta114
    @rajatmehta114 2 ปีที่แล้ว +1

    How to generate a pdf file in Files instead of Notes and Attachments??

    • @ShubhamLashkan
      @ShubhamLashkan  2 ปีที่แล้ว +1

      When we create any pdf and link it to any object record like in the video i am linking to contact record then it automatically gets displayed on the files object

    • @rajatmehta114
      @rajatmehta114 2 ปีที่แล้ว +1

      So it will be displayed in both notes and attachment as well as file?

    • @ShubhamLashkan
      @ShubhamLashkan  2 ปีที่แล้ว +1

      Yes it will displayed on related Notes and attachments and on Files as well 👍

    • @rajatmehta114
      @rajatmehta114 2 ปีที่แล้ว +1

      @@ShubhamLashkan Thanks!! It worked, do you know how can i update the pdf, like if I update the record, then only 1 pdf should be there and latest records should be appended in the same file.

    • @ShubhamLashkan
      @ShubhamLashkan  2 ปีที่แล้ว +1

      Have to think about it. I will upload a video for sure in future 👍

  • @user-cc8uw3gx8v
    @user-cc8uw3gx8v 4 หลายเดือนก่อน +1

    Your method of explaining the through developer guide is great. Thanks for making video.

    • @ShubhamLashkan
      @ShubhamLashkan  4 หลายเดือนก่อน +1

      Thank you for appreciation 🙏
      Please consider subscribing and share with community 🙏

  • @anandhikandasamy3330
    @anandhikandasamy3330 2 ปีที่แล้ว +1

    Nice video! Really helpful for me to understand how the three objects are related. Thanks!

  • @rakshitrawat581
    @rakshitrawat581 9 หลายเดือนก่อน +1

    sir your explaination is so good

    • @ShubhamLashkan
      @ShubhamLashkan  9 หลายเดือนก่อน

      Thank You 🙏
      Consider subscribing and sharing with your friends 🙏

  • @nabinayasmin6102
    @nabinayasmin6102 ปีที่แล้ว +1

    It was very helpful.

    • @ShubhamLashkan
      @ShubhamLashkan  ปีที่แล้ว

      Glad it helped you understand the relationship between them 👍

  • @AkudikeChijioke-ht8ws
    @AkudikeChijioke-ht8ws ปีที่แล้ว +1

    Adorable 💕

  • @user-tk6cs6zn2m
    @user-tk6cs6zn2m ปีที่แล้ว +1

    @shubhamLashkan
    So if i get Quote template from Quote template object to Opportunity Object? Can i able to download that from opportunity object?

    • @ShubhamLashkan
      @ShubhamLashkan  ปีที่แล้ว

      Sorry i didn't get your question.
      Can you please elaborate.

  • @rognt-qx9hi
    @rognt-qx9hi ปีที่แล้ว +1

    I have used visual force page to generate pdf by button click pdf is generated now what ever generated pdf should attach to related record can we do that

    • @ShubhamLashkan
      @ShubhamLashkan  ปีที่แล้ว

      In this video i am relating the PDF to the record.

  • @nabinayasmin6102
    @nabinayasmin6102 ปีที่แล้ว +1

    Can you make one video about how to make
    lwc component works in multiple language..

    • @ShubhamLashkan
      @ShubhamLashkan  ปีที่แล้ว

      I haven't yet learned LWC for now but might be in future.
      But thank you for suggesting the topic 👍

  • @subhrangshubanerjee9442
    @subhrangshubanerjee9442 11 วันที่ผ่านมา +1

    Thanks for your nice video .
    Can we create same as an image file with .png extension? I created an image file but during opening the file it is showing as "It appears that we do not support this file format".

    • @ShubhamLashkan
      @ShubhamLashkan  11 วันที่ผ่านมา +1

      Will try to do this and let you know.
      Please share the code which you wrote

    • @subhrangshubanerjee9442
      @subhrangshubanerjee9442 11 วันที่ผ่านมา

      @@ShubhamLashkan Thanks for ur quick reply.
      Actually I was trying to save an htmlBody of emailmessage object into a pdf file so that user can use it later.
      It worked fine for few email messages but did not work for other few.
      I observed when an htmlBody contains an image which has src='', it is thowing error,
      I removed imamge tag dynamiccaly in apex code which has src='' ,
      it worked fine for that email message but did not work for all as html message may have different content.
      Did not find tha actual reason.
      I decided to save htmlBody into image but get error as below
      during opening the file it is showing as "It appears that we do not support this file format".
      ContentVersion cv = new ContentVersion();
      cv.Title = email.Subject; // dynamic
      cv.PathOnClient = email.Subject + '.png'; // dynamic
      cv.ContentLocation = 'S';
      cv.VersionData = Blob.valueOf(strHtmlBody); // strHtmlBody is htmlBody of emailMessage object
      insert cv;

    • @subhrangshubanerjee9442
      @subhrangshubanerjee9442 11 วันที่ผ่านมา

      @@ShubhamLashkan Thanks for your quick reply.
      Actually I was trying to save an htmlBody of emailmessage object into a pdf file so that user can use it later.
      It worked fine for few email messages but did not work for other few.
      I observed when an htmlBody contains an image which has src='', it is thowing error,
      I removed imamge tag dynamiccaly in apex code which has src='' ,
      it worked fine for that email message but did not work for all as html message may have different content.
      Did not find tha actual reason.
      I decided to save htmlBody into image but get error as below
      during opening the file it is showing as "It appears that we do not support this file format".
      ContentVersion cv = new ContentVersion();
      cv.Title = email.Subject; // dynamic
      cv.PathOnClient = email.Subject + '.png'; // dynamic
      cv.ContentLocation = 'S';
      cv.VersionData = Blob.valueOf(strHtmlBody); // strHtmlBody is htmlBody of emailMessage object
      insert cv;

  • @rohantarale8251
    @rohantarale8251 ปีที่แล้ว +1

    what if there is file already stored in attachment/files and I want that file to be attach in the email, is it possible to do...???

    • @ShubhamLashkan
      @ShubhamLashkan  ปีที่แล้ว

      Yes it is possible 👍

    • @rohantarale8251
      @rohantarale8251 ปีที่แล้ว

      @@ShubhamLashkan can u tell me how it can be done...??

  • @TamilSelvan-vy3lm
    @TamilSelvan-vy3lm ปีที่แล้ว +1

    how to add image as files in base64