• Staci Cara
  • NEWBIE
  • 30 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 5
    Replies

Hello,

I was wondering if there is a way to export some field of Contacts as a Excel template or to create a pdf that looks as a table from excel for as many columns as fields that need to be exported (e.g 20)?

Thank you in advance for your support.

Staci

Hi,

I have dificulties to display some fields and their content in a table.  I need to extract some records from an object with their name and their description. With a simple apex: repeat I am getting a list of these infos, means the one beneath the other. What I need is a table that has two rows and two columns. First row has the name of the record, second row contains the according description. If there are more then 2 records, than the "list" should continue beneath. Means one would have multiple tables beneath each other.

Could someone held me with this issue? That's what I have until now, but it is listing my records on the page...

<apex:repeat value="{!SObject__c.record__r}" var="record">
        <table class="table-with-border record-table">
            <tr>
                <th class="record">{!record.Name}</th>
            </tr>
            <tr>
                <td class="table-cell">
                    <apex:outputText styleClass="description" escape="false" value="{!record.description__c}" />
                </td>
            </tr>
        </table>
    </apex:repeat>
 

 

Hi guys, 

I am having this trigger Handler and I want to use a Constructor, which is calling a class that has methods I need to use. 

My problem is that I want to initialize the constructor in the beforeTrigger Method and call a method of the class in the afterTrigger part. 

Means something like this:

public with sharing class SObjectTriggerHandler extends TriggerHandler {
    Class class;

    public override void beforeUpdate() {
           class = new Class((List<SObject>) Trigger.new, (Map<Id,SObject>) Trigger.oldMap);
    }
   

    public override void afterUpdate() {
          if(class != null) {

class.method();

}

    }

But the afterTrigger won't call the method, because class is null. 

I guess it has to do with the notation at the beginning, since I am initializing the constructor in the beforeTrigger, but isn't that so that the beforeTriggers get executed before the AfterTriggers? Shouldn't then the class have a value. 

After the beforeUpdate the class has defently a value and isn't null. 

What am I doing wrong? Could please somebody help me with this issue? It is urgent!

Thank you in advance! 

Hi, 

I want to Map a standard field value (Type String e.g. name) of each User (in users), in case it is not null or '',  with a standard SObject.

The DeveloperName of the SObject and the fieldvalue of the User are beeing the connection of these two. means DeveloperName =: user.fieldValue

But in order to refere to every User of users I would need to write this select inside the for loop and that is not a good way of writing a loop. 

How can I map the right name to the right SObject? Could please someone give me a hint? 

I have come to this result so far, but am very unsure if that is a valid solution:

public static boolean methodname (List <User> user, Map)
       Map <String, SObject> resultMap = new Map <String, SObject>();
       SObject so = [SELECT Id FROM SObject];
   
       for(User u : users){
            if(u.Name != null || u.Name != ' ' ){
                resultMap.put(u.name, so);
                   return true;
            }
        }
          return false;
}

 

Thank you in advance. 

Hi, i have this watermark added to my visualforce PDF but it actually override all my text.
<img src="{!URLFOR($Resource.tran_watermark)}" width="100%" height="100%" style="position:fixed; background-repeat:repeat; left:0cm; top:0cm; z-index:0; display:{!IF(quote.status == 'approved', 'none', '')}"/>


How can i push the watermark (png file) to the back?