• Tizian Kirchmann
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies
Hi guys,

I have a visualforce page looking like this:
 
<apex:page standardController="Rapport__c" renderAs="pdf" docType="html-5.0" showHeader="false" applyHtmlTag="false">
   <body>
    <apex:form >
       <apex:pageBlock >
        <apex:stylesheet value="{!$Resource.pdfStyle2}"/>

             [...]

        </apex:pageBlock>
    </apex:form>             
   </body>
</apex:page>


Now I want to write some code in apex and connect it to my visualforce page.
How can you do this?

And second, I want to create a function, that activates a checkbox if the user who created the pdf clicks on the custom button to show the visualforce page because clicking the button and opening the visualforce page always means that the user is going to print the page. The boolean function for that should be something like 'vfPageIsPrinted'.

So, quick sum up:

Custom button 'Create_Rapport' clicked by user after creating a record -> checkbox 'IsPrinted?' = true

Custom button 'Create_Rapport_ NOT clicked by user after creating a record -> checkbox 'IsPrinted?' = false

Any ideas how to achieve that? 

Thanks :-)
Hi guys,

Im trying to get into apex programming by doing the trailhead challenges.
Sadly, I'm stuck at the challenge 'manipulate records with dml'. 
To my programming knowledge: I only know very few java basics from school, so I'm definetly new to it.

Here is how my code looks at the moment:
 
public class AccountHandler {
   
    public static String insertNewAccount(String name) {
        		
        Account acct = new Account();
        acct.Name = name;
        return Name;
	}
}

I would like to know if my code above is correct and how to implement the empty DML string that should return NULL.

Any help is appreciated.
Hi everyone,

I created a visualforce page for our company.

There is e.g. this code snippet:
 
<apex:outputText value="Gesamtzeit" style="{!if(Rapport__c.Beginn2__c == NULL,'margin-top: 17px;','')}"/>

I want to achieve that the text value ("Gesamtzeit") gets moved downwards by 17px when the field value of field Beginn2__c is NULL and stay at the same place (do nothing) when its NOT NULL.

Somehow it doesnt do anything when I check the result even though there is no error or anything.

Am I doing anything wrong?

Thanks
Tizian
 
Hi guys,

I created a visualforce page which displays the content of a field called 'Description'. This field can be several rows long and I want to add a whitespace with &nbsp; at the beginning of every row.

At the moment it looks like that:
 
&nbsp;<apex:outputField value="{!Rapport__c.Description__c}"/>

But obviously I will only have a whitespace in the first row and not in the following ones. So how do I ensure that at the beginning of every row, there is a whitespace before the text begins?

Thanks for your help.
Hey everybody,

I created my first Visualforce page for cases and implemented it. It is working with renderas="pdf".
Is there a possibility to create a code snippet that activates a control box with the name "IsPrinted" if a user printed that visualforce-pdf-document?
In addition to that I need the same thing with "IsSaved" if the user saved the pdf to his desktop. 

I'd appreciate any help.
Tizian K.
Hi guys,

I have a visualforce page looking like this:
 
<apex:page standardController="Rapport__c" renderAs="pdf" docType="html-5.0" showHeader="false" applyHtmlTag="false">
   <body>
    <apex:form >
       <apex:pageBlock >
        <apex:stylesheet value="{!$Resource.pdfStyle2}"/>

             [...]

        </apex:pageBlock>
    </apex:form>             
   </body>
</apex:page>


Now I want to write some code in apex and connect it to my visualforce page.
How can you do this?

And second, I want to create a function, that activates a checkbox if the user who created the pdf clicks on the custom button to show the visualforce page because clicking the button and opening the visualforce page always means that the user is going to print the page. The boolean function for that should be something like 'vfPageIsPrinted'.

So, quick sum up:

Custom button 'Create_Rapport' clicked by user after creating a record -> checkbox 'IsPrinted?' = true

Custom button 'Create_Rapport_ NOT clicked by user after creating a record -> checkbox 'IsPrinted?' = false

Any ideas how to achieve that? 

Thanks :-)
Hi guys,

Im trying to get into apex programming by doing the trailhead challenges.
Sadly, I'm stuck at the challenge 'manipulate records with dml'. 
To my programming knowledge: I only know very few java basics from school, so I'm definetly new to it.

Here is how my code looks at the moment:
 
public class AccountHandler {
   
    public static String insertNewAccount(String name) {
        		
        Account acct = new Account();
        acct.Name = name;
        return Name;
	}
}

I would like to know if my code above is correct and how to implement the empty DML string that should return NULL.

Any help is appreciated.
Hi guys,

I created a visualforce page which displays the content of a field called 'Description'. This field can be several rows long and I want to add a whitespace with &nbsp; at the beginning of every row.

At the moment it looks like that:
 
&nbsp;<apex:outputField value="{!Rapport__c.Description__c}"/>

But obviously I will only have a whitespace in the first row and not in the following ones. So how do I ensure that at the beginning of every row, there is a whitespace before the text begins?

Thanks for your help.