need help to pdf code genreration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yberges
    Senior Member
    • Jul 2022
    • 174

    need help to pdf code genreration

    hello i am a newbe to espo i try to save a project started by an other dev ...
    i need to understand this code that create and integrate pdf in a field
    Code:
    // pdfPieceId = ext\pdf\generate('Invoice', entity\attribute('id'), '61ba033fb7e940eab', 'FactureConvention.pdf');
    
    $nomPdf = string\concatenate(number, "-Convention_Journees_",participant.name,".pdf");
    
    pdfPieceId = ext\pdf\generate('Invoice', entity\attribute('id'), '61ba033fb7e940eab', $nomPdf);
    
    name = string\concatenate(number, "- Facture Convention : ",participant.name);​
    after generation process i didn't find pdf in related field
    workflow is ok
    if i undesrtand to create a pdf with name and add pdf in field ... but how i can found field id to check if all is good ?

    Code:
    pdfPieceId = ext\pdf\generate('Invoice', entity\attribute('id'), '61ba033fb7e940eab', $nomPdf);
    thank for explain
  • rabii
    Active Community Member
    • Jun 2016
    • 1250

    #2
    when you generate a pdf it returns the pdfId in you case pdfPieceId is the id returned once the file is generated. so you can check if the pdfPieceId.
    Rabii
    Web Dev

    Comment

    • yberges
      Senior Member
      • Jul 2022
      • 174

      #3
      but how i can check the field how the pdf was insert ?
      if i check code that
      entity\attribute('id'), '61ba033fb7e940eab'
      => how can find this id ?

      Comment

      • yberges
        Senior Member
        • Jul 2022
        • 174

        #4
        hello and happy new year
        some can help me ?

        Comment

        • shalmaxb
          Senior Member
          • Mar 2015
          • 1606

          #5
          This is not possible to understand without knowing your app.

          Comment

          • yberges
            Senior Member
            • Jul 2022
            • 174

            #6
            hello what do you need ? workflow printscreen ?

            Comment

            Working...