• Octavio Garcia
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hola a todos.

Estoy realizando un PDF con Visualforce pero me marca el siguiente error: 
Propiedad 'Presupuesto_Lead__cStandardController.Resource' desconocida. ya hice varias modificaciones, incluso revise los que cree con anterioridad y no se que es lo que esta pasando.
Comparto el controlador como el VF.

Controller:
public without sharing class Presupuesto_lead {
    

    public DATE     Fecha_de_expiracion {get; set;}
    
    
        public Presupuesto_lead(ApexPages.StandardController controller) {
            
                Presupuesto_Lead__c[] plead = [Select Name, Cantidad1__c, Cantidad2__c, Cantidad3__c, Cantidad4__c,
                                                   Porcentaje_de_Descuento1__c, Porcentaje_de_Descuento2__c, Porcentaje_de_Descuento3__c, Porcentaje_de_Descuento4__c
                                               
                                                      From Presupuesto_Lead__c
                                                      Where Id=:controller.getId()];
        
                Product2[] p = [Select Name
                                     From Product2
                                     Where Id=:controller.getId()]; 
        
                Familia_de_productos__c[] fp = [Select Name
                                                      From Familia_de_productos__c
                                                        Where Id=: controller.getId()];
        
                Lead [] lead = [Select Name, lead.Company
                                        From Lead
                                        Where Id=: controller.getId()];
        

}
    }

Página VF:
<apex:page standardController="Presupuesto_Lead__c" extensions="Presupuesto_lead"  renderAs="pdf">
    
    <head>
        <style>
                h2 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h3 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h4 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h5 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h6 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h7 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; } 
                h8 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h9 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h10 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                td { color: #2e2e65 ; font-size : 15xp ; font-family : Arial; }
                * {
                box-sizing: border-box;
                }
                
                .heading {
                font-weight: bold;
                }
                
                .heading--main {
                font-size: 36px;
                }
                
                .heading--sub {
                font-size: 21px;
                }
                             
                .box--full {
                float: center;
                width: 100%;
                }  
                
                 table {
                border: 1; 
                margin-top: 25px;
                width: 100%;
                }        
                
                th {
                background-color: #19d3c5;
                font-align: left;
                font-size: 14px;
                font-weight: bold;
                padding: 5px;
                }
            </style>
          <img src="{!Resource.Logonuevo}" width="200" height="150"> </img> <br/><br/>
          <br/>
          <br/>
       </head>        
        <body>
        <center>
          <h1>Presupuesto para Lead</h1>
        </center>
            <table border="1" bordercolor="red"> <br/>
              <div align="right">
                <h6> Fecha de Vencimiento: {!Day(Presupuesto_Lead__c.Fecha_de_Expiraci_n__c)}-{!Month(Presupuesto_Lead__c.Fecha_de_Expiraci_n__c)}-{!Year(Presupuesto_Lead__c.Fecha_de_Expiraci_n__c)}
                </h6>
              </div> 
              <div align="left">
                <h2> Nombre de Presupuesto: {!Presupuesto_Lead__c.Name}
                </h2>
              </div>
              <div align="left">
                <h4> Prospecto: {!Presupuesto_Lead__c.Prospecto__r.Name}
                </h4>
              </div>
              <div align="left">
                <h5> Compañia: {!Presupuesto_Lead__c.Compa_a__r.Name}
                </h5>
              </div>
            </table>
         <center>
          <h1> Detalles </h1><br/>
         </center> 
          <center>               
           <table border="2">
             <tr>
              <th> Producto </th>
              <th> Cantidad (TON) </th>
              <th> Subtotal de producto (USD) </th>
              <th> Total del producto (USD) </th>
             </tr>
            <apex:repeat value="{!Presupuestaci_n__c}" var="Presupuestaciones">
             <tr>
               <td>{!Presupuesto_Lead__c.Producto1__r.Name}</td>
               <td>{!Presupuesto_Lead__c.Cantidad1__c}</td>
                <td> <div class="input-icon">
                <input type="text">
                 <i>$ {!Presupuesto_Lead__c.SubTotal1__c}</i>
                </input>
                </div></td>
                 <td> <div class="input-icon">
                 <input type="text">
                  <i>$ {!Presupuesto_Lead__c.Precio_Total1__c}</i>
                 </input>
                 </div></td>
            </tr>
            <tr>
               <td>{!Presupuesto_Lead__c.Producto2__r.Name}</td>
               <td>{!Presupuesto_Lead__c.Cantidad2__c}</td>
                <td> <div class="input-icon">
                <input type="text">
                 <i>$ {!Presupuesto_Lead__c.SubTotal2__c}</i>
                </input>
                </div></td>
                 <td> <div class="input-icon">
                 <input type="text">
                  <i>$ {!Presupuesto_Lead__c.Precio_Total2__c}</i>
                 </input>
                 </div></td>
            </tr>
            <tr>
               <td>{!Presupuesto_Lead__c.Producto3__r.Name}</td>
               <td>{!Presupuesto_Lead__c.Cantidad3__c}</td>
                <td> <div class="input-icon">
                <input type="text">
                 <i>$ {!Presupuesto_Lead__c.SubTotal3__c}</i>
                </input>
                </div></td>
                 <td> <div class="input-icon">
                 <input type="text">
                  <i>$ {!Presupuesto_Lead__c.Precio_Total3__c}</i>
                 </input>
                 </div></td>
            </tr>
            <tr>
               <td>{!Presupuesto_Lead__c.Producto4__r.Name}</td>
               <td>{!Presupuesto_Lead__c.Cantidad4__c}</td>
                <td> <div class="input-icon">
                <input type="text">
                 <i>$ {!Presupuesto_Lead__c.SubTotal4__c}</i>
                </input>
                </div></td>
                 <td> <div class="input-icon">
                 <input type="text">
                  <i>$ {!Presupuesto_Lead__c.Precio_Total4__c}</i>
                 </input>
                 </div></td>
            </tr>
          <table border="4" bordercolor="blue"><br/>        
              <div align="right">
               <h7> Creado por: {!PPresupuesto_Lead__c.CreatedBy.Name} </h7>
              </div>
              <div align="right">
               <h8> Email de vendedor: {!Presupuesto_Lead__c.CreatedBy.Email} </h8>
              </div>
              <div align = "right">
                <h9> Teléfono de propietario: {!Presupuesto_Lead__c.CreatedBy.Mobile} </h9>
              </div>
              <div align = "right">
                <h10> Cargo: {!Presupuesto_Lead__c.CreatedBy.Title} </h10>  
              </div>
          </table>
            </apex:repeat>
           </table>
          </center>
        </body>
</apex:page>

Agradeceria mucho su apoyo
Hello everyone.
I´m a salesforce administrator, and i try delate a register from Account that don´t have 2 specific fields and this I think will be trying with a flow but I can't because the prove gives me an error mentioned above.


Somo one help me. 
Thank you every one