• Yefer Monroy 7
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello folks,

I´m new in the world SF developer so I need help about one cases where I am create a VF page PDF and show custom fields of Object Account, Task and Asociacion__c, but I can´t to do that it works.

I have three objects, two standar object and one costum object those are Account, Task and Asociacion__c. We need creted a PDF with fields of those objects but when execute it don´t works. Someone Help me please, It take me many time.

I don´t know How to do for I related fields of Task and Asociacion__c and show it in PDF, I have tried with costume controller but it don´t works. :(

My Code VF Page

<apex:page standardController="Account" extensions="MyControllerCuentasTareasAfil" renderAs="PDF">
    <h1>
        PRUEBA DE BOTTON DE CUENTA
    </h1>
    <p1>
        A continuación los datos de la cuenta son:
    </p1>
    <table>
        <tr><th>Nombre de la cuenta:</th>
            <td><apex:outputText value="{!Cuentas.name}"/></td>
            </tr>
        <tr><th>Tarea:</th>
            <td><apex:relatedList list="Task.status"/></td>
        </tr>
        <tr><th>Afiliacion:</th>
        <td><apex:outputText value="{!Asociacion__c.id}"></apex:outputText></td>
        </tr>
           </table>
</apex:page>

This is My controller (I can´t to do for fields related with objects Task and Asociacion__c)

public class MyControllerCuentasTareasAfil {
    
        public Account cuentas{get; set;}
        public Task Tareas {get; set;}
    
    public MyControllerCuentasTareasAfil(apexpages.StandardController stdController){
        
        cuentas = [SELECT id, name, ciudad__c
                          FROM Account
                        WHERE id = :ApexPages.currentPage().getParameters().get('id')
                        LIMIT 1];
    }    
    public Account ObtCtas(){
        return Cuentas;    
    }
}

THNKS
Hello folks,

I´m new in the world SF developer so I need help about one cases where I am create a VF page PDF and show custom fields of Object Account, Task and Asociacion__c, but I can´t to do that it works.

I have three objects, two standar object and one costum object those are Account, Task and Asociacion__c. We need creted a PDF with fields of those objects but when execute it don´t works. Someone Help me please, It take me many time.

I don´t know How to do for I related fields of Task and Asociacion__c and show it in PDF, I have tried with costume controller but it don´t works. :(

My Code VF Page

<apex:page standardController="Account" extensions="MyControllerCuentasTareasAfil" renderAs="PDF">
    <h1>
        PRUEBA DE BOTTON DE CUENTA
    </h1>
    <p1>
        A continuación los datos de la cuenta son:
    </p1>
    <table>
        <tr><th>Nombre de la cuenta:</th>
            <td><apex:outputText value="{!Cuentas.name}"/></td>
            </tr>
        <tr><th>Tarea:</th>
            <td><apex:relatedList list="Task.status"/></td>
        </tr>
        <tr><th>Afiliacion:</th>
        <td><apex:outputText value="{!Asociacion__c.id}"></apex:outputText></td>
        </tr>
           </table>
</apex:page>

This is My controller (I can´t to do for fields related with objects Task and Asociacion__c)

public class MyControllerCuentasTareasAfil {
    
        public Account cuentas{get; set;}
        public Task Tareas {get; set;}
    
    public MyControllerCuentasTareasAfil(apexpages.StandardController stdController){
        
        cuentas = [SELECT id, name, ciudad__c
                          FROM Account
                        WHERE id = :ApexPages.currentPage().getParameters().get('id')
                        LIMIT 1];
    }    
    public Account ObtCtas(){
        return Cuentas;    
    }
}

THNKS