• Prem Anandh 1
  • NEWBIE
  • 344 Points
  • Member since 2016
  • Trekbin Technology


  • Chatter
    Feed
  • 11
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 93
    Replies
Hi everyone,

Recentetly I've added a form page where user can add much as rows as he wants. All of the input fields keep the previous row data in the form except the checkbox.

FYI, the checkbox does not belong to any standard or custom object, it is just a checkpoint for checking if certain input field checked or not.

I tried to declare the checkbox as List<Boolean> but same issue. Please advise.

Thanks
Hello,

I have a batch class for converting Contacts into Community Users. My test class keeps failing and I can't seem to get more than 37% coverage. The error I get from the failed tests is:
Error Message: System.NullPointerException: Attempt to de-reference a null object
Stack Trace: Class.ConvertToCommUsers.execute: line 23, column 1
Class.TestConvertTOCommUsers.test: line 20, column 1
Any help would be greatly appreciated!

The class
global class ConvertToCommUsers implements Database.Batchable<sObject> {
	global String query;   
    	global Database.QueryLocator start(Database.BatchableContext BC){
        	query = 'SELECT	Id, FirstName, LastName, Name, Email, AccountId FROM Contact WHERE RecordType.Name = \'Learner\' AND Id NOT IN (SELECT ContactId FROM User)'; 
        
        	return Database.getQueryLocator(query);
    }
    
    global void execute(Database.BatchableContext BC, List<Contact> scope){
        String Passwd;
        Profile LPCommPf = [SELECT Id, Name FROM Profile WHERE Name = 'Learner Profile Community User' LIMIT 1];
        List<Messaging.SingleEmailMessage> setPWs = new List<Messaging.SingleEmailMessage>();
        List<User> learners = new List<User>();
        
        for (Contact c : scope){
           User u = new User();
            	u.FirstName = c.FirstName;
                u.LastName = c.LastName;
                u.ContactId = c.Id;
                u.Email = c.Email;
                u.Username = c.Email;
                u.CommunityNickname = c.Email.Trim().toLowerCase();
                u.Alias = c.Name.abbreviate(8);
                u.ProfileId = LPCommPf.id;
                u.LocaleSidKey = 'en_US';
                u.TimeZoneSidKey = 'America/New_York';
                u.LanguageLocaleKey = 'en_US';
                u.EmailEncodingKey = 'UTF-8';
                String pwd = Passwd;
            
            learners.add(u);
        } 
            
        	insert learners;
        
        for( User s : learners){
            
            Messaging.SingleEmailMessage setPW = new Messaging.SingleEmailMessage();
        	List<String> sendTo = new List<String>();
        	sendTo.add(s.Email);
        	setPW.setToAddresses(sendTo);
        	setPW.setSenderDisplayName('info@digitalonramps.com');
        	setPW.setSenderDisplayName('Digital On-Ramps');
        	setPW.setTemplateId('00X17000000E35e'); 
        	setPW.setTargetObjectId(s.Id);
        	setPW.setSaveAsActivity(false);
            
            setPWs.add(setPW);
            
        }
        Messaging.sendEmail(setPWs);
    }
    
    global void finish(Database.BatchableContext BC){
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        mail.setToAddresses(new String[] {'meg372@drexel.edu'});
        	mail.setReplyTo('batch@digitalonramps.com');
        	mail.setSenderDisplayName('Batch Processing');
        	mail.setSubject('Batch Process Complete');
        	mail.setPlainTextBody('Batch Process has completed');
        
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
        
    }

}

The test class
@isTest
private class TestConvertToCommUsers {
    static testmethod void test(){
        Database.QueryLocator QL;
        Database.BatchableContext BC;
        List<Contact> scope = new List<Contact>();
        
            Contact c = new Contact(FirstName= 'Test', LastName = 'Test', Email='testtest@dor.com',  RecordTypeId = '012G0000001QJQc');
            scope.add(c);
        
        	insert scope;
        	 
    
    
        Test.startTest();
         
        ConvertToCommUsers comm = new ConvertToCommUsers();
       	comm.query = 'SELECT Id, FirstName, LastName, Name, Email, AccountId FROM Contact';
        QL = comm.start(BC);
        comm.execute(BC, scope);
        comm.finish(BC);

        Test.stopTest();       
    }
}




Thanks in advance!
Liz

Hello Friends !

I wanted to sort Account columns in vf page. Onclick on any of the Account column i wanted to sort from Ascending to Descending and vice-versa.
I'm pasting my requirement in below image.
onclick on Account Name it should sort with upward and down ward  arrow

In the above image onclick of blue color columns i wanted to sort. 
Please provide me best approach other than javascript plugings.

For Better understanding on my requirement please see list view. 


Thanks,
Jagadeesh

Hi All,
Action function is not working in Mozila fire fox ,however it is working in Chrome .Why I have added funTwo here as I need to implement confirm dialog on this .
 
<apex:page controller="TesActFunction">
	<apex:form id="frm" >
		<apex:commandButton value=" Test" onclick="funOne();"/>
		<apex:actionFunction action="{!actionMethod}" name="funTwo" reRender="frm" />
	</apex:form>
	<script>
		function funOne(){
			funTwo();
		}
	</script>
</apex:page>
public class TesActFunction {
	public PageReference actionMethod() {
        System.debug('mmmmmmmmmmmmmmmmmmmmmmmm');
        return null;
    }
}

Please let me know if any one has any work around .
 
  • March 31, 2016
  • Like
  • 0
i have a cloumn KOLTitleRole in my visualforce page in which i get duplicate values. i have modified the code but still getting duplicates... where am i going wrong?please help...
i have attached my  code below
vf page:
 <apex:pageBlockTable value="{!KOLTitleRole}" var="v"  style="width:100px;">
    <apex:column headerValue="KOL - Title/ Role">
    <apex:outputLink value="/{!v.id}" target="_blank" style="text-decoration:none;">
    <apex:facet name="Header">KOL-Title/ Role</apex:facet>
    <div style="color:white; background-color:{!If(v.Status__c =='Not Needed'||v.name==null,'color:#797d7f','#736F6E')};">
      {!v.KOL_Title__c} </div></apex:outputLink>
    </apex:column> 
    </apex:pageBlockTable>
controller:
public List<Product_EntryStatus__c>getKOLTitleRole()
{
List<Product_EntryStatus__c>dosiersumbitlist;
// dosiersumbitlist= [SELECT Name,Status__c,Country__c,Product__c,KOL_Title__c,Key_Opinion_Leader__c FROM Product_EntryStatus__c where Country__c =: prod.Country__c and Product__c=: prod.Product__c and KOL_Title__c!=null];
List<Product_EntryStatus__c> lstAccount = new List<Product_EntryStatus__c>();
 
Set<String> setKolName = new Set<String>();
 
lstAccount = [select Name,KOL_Title__c from Product_EntryStatus__c where Country__c =: prod.Country__c and Product__c=:prod.Product__c and KOL_Title__c!=null] 
for (Integer i = 0; i< lstAccount.size(); i++)
{
    setkolName.add(lstAccount[i].KOL_Title__c); // contains distict values
    String qs='SELECT Name,Status__c,Country__c,Product__c,KOL_Title__c,Key_Opinion_Leader__c FROM Product_EntryStatus__c where' +Product_EntryStatus__c.KOL_Title__c +'IN :'+setkolName;
    System.debug('Query string is: '+ qs);
    System.debug('****************************************'+setkolName);
 dosiersumbitlist= [SELECT Name,Status__c,Country__c,Product__c,KOL_Title__c,Key_Opinion_Leader__c FROM Product_EntryStatus__c where KOL_Title__c =:setkolName];
}
return dosiersumbitlist;
}
I have a batchable class using which I am sharing groups to cases based on criteria. While I perform this I realize that I will need to fetch the cases
and perform a validation to check which of the cases have sharing already and which do not have. After which I will share groups only to cases which do not have the sharing. How do we achieve this using batch apex?
Hi All,

I need to create a formula field for the below scenario. I tried many ways to get the formula field.

Type Field contains two values. Those are
1.ASD8765
2.OPDQ76YTH

If Type field begins with 'A', the formula field should store the first 4 characters of the string as Formula field ='ASD8'
If Type field begins with 'O', the formual field should store the first 3 charaters of the string as Fomula field = 'OPD'

Can any one help me to solve this.

Thank You!!
Arjun
Hi, I've never studied coding or developing, so I'm having a bit of trouble figuring this out. Basically what I want my formula text to do is, if the Days Since Last Update field > 90 AND if Stage Name does not equal Closed Won or Closed Lost, show an image of a red exclamation point so that users know this opportunity needs to be reviewed. 

Here is the formula I am using: IF(AND(Days_Since_Last_Update__c > 90), IMAGE ("/servlet/servlet.FileDownload?file=015j0000000PsCZ","Red:High Importance"),null) 

The only issue is, I'm not sure how to insert the piece about if the Stage Name (which is a picklist) equals Closed Won / Closed Lost, the red image does not have to be shown and the opportunity does not have to be reviewed. 

Thank you so much for your help!!
@RestResource(urlMapping='/myrest2/*')
global with sharing class Rest_Class2
{
   @HTTPGet
   global static Account[] doGet()
   {
      RestRequest req = RestContext.request;

      RestResponse res = RestContext.response;
      
      String currentIndustry=req.requestURI.substring(req.requestURI.lastIndexof('/')+1);
      
      Account[] acts=new Account[]{};
      
      if (currentIndustry=='all')
      
         acts=[select Name,Industry from account where Industry=:currentIndustry];
      
      else
      
          acts=[select Name from account where Industry=:currentIndustry];
         
      return acts;
   } 
   
}
Hi friends

I have written a rest resource where I want to display all account where Industry='Energy'. when I test this is work bench it is showing error as 
Service not found at: /services/apexrest/industry/enerygy

If it do as       /services/apexrest/industry/all    then it will show all accounts
But either way its not showing records.
Pls guide me.

divya
 
Hi all,
 case object Activity History show to account page at InlineVisualforce page
How to divide/multiply a number, and then display values based on the result?

Example:
number__c / 5 * 30

If the answer is below 100, then display "Disappointing"
If the above 101, then display "WOW"
 
Hi Team,

I developed a login page for my commuinity and i am giving another vf as Home Page.. And sharing the communtiy link to partner users for logginig in,
When the user clicks on the link its directly landing the home page instead of login page...

KIndly help me on this
I have an apex class which takes project Id from the URL of VF Page and displays all tasks assigned to it. The VF Page is opened from a custom button on Standard SFDC project object layout
(Sample URL: https://<sfdc instance>/apex/TaskPage?id=<projectId>)
I need help to write test class for this Apex Class

Apex Class
public class TaskClass{
	Id projectId;
	String errorMessage{get;set;}
	public List<Task__c>  taskList{get;set;}
	
	public TaskClass(){
		projectId = ApexPages.currentPage().getParameters().get('id');
		if(projectId!=null){
			try{
				taskList = [Select id,Name from Task__c where project__c =: projectId];
			}catch(Exception e){
				errorMessage = 'No records found';
			}
		}
		else
			errorMessage = 'Invalid URL';
	}
	//other functions
}

 
  • April 01, 2016
  • Like
  • 0
Hi

I have created a currency field but my requirment is format should be 4 decimal after point(12.98765).i have set (14,4),but it is showing 2 decimal when record saved.
how to assign permission set to a public group??
Hello - I'm using this java script on my button to make sure the address is filled out... But since i started using window.open it opens this new page in a new tab.
I want it to be the same tab and just go to the new page like before. Is there a different function i should be using to open this?
 
{!REQUIRESCRIPT("/soap/ajax/21.0/connection.js")} 

var leadAddress = '{!Lead.Street}'; 
var leadCity = '{!Lead.City}'; 
var leadState = '{!Lead.State}'; 
var leadCountry = '{!Lead.Country}'; 
var leadZip = '{!Lead.PostalCode}'; 

if(leadAddress == null || leadAddress == ''){ 
alert('Please enter a valid Street Address along with the City, State/Province, Zip/Postal Code and Country before clicking on this button.'); 
} 
else if(leadCity == null || leadCity == ''){ 
alert('Please enter a valid Street Address along with the City, State/Province, Zip/Postal Code and Country before clicking on this button.'); 
} 
else if(leadState == null || leadState == ''){ 
alert('Please enter a valid Street Address along with the City, State/Province, Zip/Postal Code and Country before clicking on this button.'); 
} 
else if(leadCountry == null || leadCountry == ''){ 
alert('Please enter a valid Street Address along with the City, State/Province, Zip/Postal Code and Country before clicking on this button.'); 
} 
else if(leadZip == null || leadZip == ''){ 
alert('Please enter a valid Street Address along with the City, State/Province, Zip/Postal Code and Country before clicking on this button.'); 
} 
else{ 
var urlStr = '/a0J/e?' 
+ 'CF00Nj00000091TUH={!Lead.FirstName &" "& Lead.LastName }' 
+ '&CF00Nj00000091TUH_lkid={!Lead.Id}' 
+ '&retURL=%2F{!Lead.Id}' 
+ '&saveURL=%2F{!Lead.Id}' 
+ '&RecordType=012j0000000pfbL' 
+ '&ent=01Ij0000001EVex' 
+ '&00Nj00000091TU6={!Lead.Company}' 
+ '&00Nj00000091TUQ=Pending'; 

window.open(urlStr); 

}



Thanks!
Hi everyone,

Recentetly I've added a form page where user can add much as rows as he wants. All of the input fields keep the previous row data in the form except the checkbox.

FYI, the checkbox does not belong to any standard or custom object, it is just a checkpoint for checking if certain input field checked or not.

I tried to declare the checkbox as List<Boolean> but same issue. Please advise.

Thanks
I need to generate a big report with all the different scenarios and calculations.
you might suggest why don't you use salesforce reporting or other reporting tool :)
But my users wants report in particular formats and different display with colors style etc. So I decided to by using EXCEL functionality which we can do by using API.
I don't have any issue in generating excel but I counted my SOQL  , they are already reached to 63.
my question is will it be any problem if only one apex class will execute 63 soqls in one transaction ?

According governer limits  we can use 100 soql for Synchronous Limit 100 and Asynchronous Limit 200.

can anyone please suggestion is that ok if only one apex class will execute 63
soqls in one transaction

 


 
  • March 31, 2016
  • Like
  • 0
Hello,

I have a batch class for converting Contacts into Community Users. My test class keeps failing and I can't seem to get more than 37% coverage. The error I get from the failed tests is:
Error Message: System.NullPointerException: Attempt to de-reference a null object
Stack Trace: Class.ConvertToCommUsers.execute: line 23, column 1
Class.TestConvertTOCommUsers.test: line 20, column 1
Any help would be greatly appreciated!

The class
global class ConvertToCommUsers implements Database.Batchable<sObject> {
	global String query;   
    	global Database.QueryLocator start(Database.BatchableContext BC){
        	query = 'SELECT	Id, FirstName, LastName, Name, Email, AccountId FROM Contact WHERE RecordType.Name = \'Learner\' AND Id NOT IN (SELECT ContactId FROM User)'; 
        
        	return Database.getQueryLocator(query);
    }
    
    global void execute(Database.BatchableContext BC, List<Contact> scope){
        String Passwd;
        Profile LPCommPf = [SELECT Id, Name FROM Profile WHERE Name = 'Learner Profile Community User' LIMIT 1];
        List<Messaging.SingleEmailMessage> setPWs = new List<Messaging.SingleEmailMessage>();
        List<User> learners = new List<User>();
        
        for (Contact c : scope){
           User u = new User();
            	u.FirstName = c.FirstName;
                u.LastName = c.LastName;
                u.ContactId = c.Id;
                u.Email = c.Email;
                u.Username = c.Email;
                u.CommunityNickname = c.Email.Trim().toLowerCase();
                u.Alias = c.Name.abbreviate(8);
                u.ProfileId = LPCommPf.id;
                u.LocaleSidKey = 'en_US';
                u.TimeZoneSidKey = 'America/New_York';
                u.LanguageLocaleKey = 'en_US';
                u.EmailEncodingKey = 'UTF-8';
                String pwd = Passwd;
            
            learners.add(u);
        } 
            
        	insert learners;
        
        for( User s : learners){
            
            Messaging.SingleEmailMessage setPW = new Messaging.SingleEmailMessage();
        	List<String> sendTo = new List<String>();
        	sendTo.add(s.Email);
        	setPW.setToAddresses(sendTo);
        	setPW.setSenderDisplayName('info@digitalonramps.com');
        	setPW.setSenderDisplayName('Digital On-Ramps');
        	setPW.setTemplateId('00X17000000E35e'); 
        	setPW.setTargetObjectId(s.Id);
        	setPW.setSaveAsActivity(false);
            
            setPWs.add(setPW);
            
        }
        Messaging.sendEmail(setPWs);
    }
    
    global void finish(Database.BatchableContext BC){
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        mail.setToAddresses(new String[] {'meg372@drexel.edu'});
        	mail.setReplyTo('batch@digitalonramps.com');
        	mail.setSenderDisplayName('Batch Processing');
        	mail.setSubject('Batch Process Complete');
        	mail.setPlainTextBody('Batch Process has completed');
        
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
        
    }

}

The test class
@isTest
private class TestConvertToCommUsers {
    static testmethod void test(){
        Database.QueryLocator QL;
        Database.BatchableContext BC;
        List<Contact> scope = new List<Contact>();
        
            Contact c = new Contact(FirstName= 'Test', LastName = 'Test', Email='testtest@dor.com',  RecordTypeId = '012G0000001QJQc');
            scope.add(c);
        
        	insert scope;
        	 
    
    
        Test.startTest();
         
        ConvertToCommUsers comm = new ConvertToCommUsers();
       	comm.query = 'SELECT Id, FirstName, LastName, Name, Email, AccountId FROM Contact';
        QL = comm.start(BC);
        comm.execute(BC, scope);
        comm.finish(BC);

        Test.stopTest();       
    }
}




Thanks in advance!
Liz

Hello Friends !

I wanted to sort Account columns in vf page. Onclick on any of the Account column i wanted to sort from Ascending to Descending and vice-versa.
I'm pasting my requirement in below image.
onclick on Account Name it should sort with upward and down ward  arrow

In the above image onclick of blue color columns i wanted to sort. 
Please provide me best approach other than javascript plugings.

For Better understanding on my requirement please see list view. 


Thanks,
Jagadeesh

Hello - I am trying to add present a different "contract number" than what is already being presented on my contract page. 
See below, i'd like to present 9721 to where 00000216 is. This custom field that shows 9721 is Contract_Number__c.
User-added image
Someone presented this code... And i created it through a new visual force page and it worked. But we already have a visual force page that we're using.
<apex:page standardController="Contract" >
<apex:detail subject="{!Contract.Id}" relatedList="false" title="true"/>
<script>
      document.getElementsByClassName('pageDescription')[0].innerHTML ='{!Contract.Contract_Number__c}';
  </script>
​</apex:page>
But it DID NOT work when i added it to my existing visual force page.
Where can i add this code in here to make this work?
 
<apex:page standardController="Contract" extensions="ContractPageController" action="{!redirectNoOverride}">

    <apex:sectionHeader title="Contract" subtitle="{!Contract.ContractNumber}" />
        <apex:pageBlock title="Contract Detail" rendered="{!AND(displayDetails, Contract.RecordType.DeveloperName == 'QGE_Order_Confirmation')}">
            <apex:form >
                <apex:inputhidden value="{!Contract.OwnerId}" />
                <apex:inputhidden value="{!Contract.Opportunity_Segment__r}" />
                <apex:inputhidden value="{!Contract.Opportunity_Segment__r.Customer_Segment__c}" /> 
                <apex:inputhidden value="{!Contract.RecordType.DeveloperName}" /> 
            </apex:form>
            <apex:pageBlockButtons >
                <apex:form >
                    <apex:commandButton action="{!edit}" value="Edit"/>
                    <apex:commandButton action="{!delete}" value="Delete"/>
                    <apex:commandButton action="{!URLFOR($Action.Contract.Clone, Contract.Id)}" value="Clone"/>
                    <apex:commandButton action="{!URLFOR($Action.Contract.Order_Confirmation, Contract.Id)}" value="Order Confirmation"/>
                </apex:form>
            </apex:pageBlockButtons>

            <apex:pageBlockSection title="Informacje o kontrakcie">
                <apex:outputField value="{!Contract.Order_Confirmation_Type__c}"/>
                <apex:outputField value="{!Contract.Link_to_PDF__c}"/>
                <apex:pageBlockSectionItem />
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Agreement_Format__c}"/>
                <apex:outputField value="{!Contract.Contract_Representative__c}"/>
                <apex:outputField value="{!Contract.Name}"/>
                <apex:outputField value="{!Contract.Account.Name}"/>
                <apex:outputField value="{!Contract.ContractNumber}"/>
                <apex:outputField value="{!Contract.Account_Number__c}"/>
                <apex:outputField value="{!Contract.Contract_Status__c}"/>
                <apex:outputField value="{!Contract.Background_Check__c}"/>
                <apex:outputField value="{!Contract.One_shot_Job__c}"/>
                <apex:outputField value="{!Contract.Data_Security__c}"/>
                <apex:outputField value="{!Contract.Credit_Request__c}"/>
                <apex:outputField value="{!Contract.Contract_Language__c}"/>
                <apex:outputField value="{!Contract.Payer_Name__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Payer_Street_Address__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Payer_Zip__c}"/>
                <apex:outputField value="{!Contract.Payer_Country__c}"/>
                <apex:outputField value="{!Contract.Payer_Vat__c}"/>
                <apex:outputField value="{!Contract.Payer_City__c}"/>
                <apex:outputField value="{!Contract.Price_Schedule_Number__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Print_all_legal_paragraphs__c}" />
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Dane dot. zamówienia">
                <apex:outputField value="{!Contract.Order_Account_Name__c}"/>
                <apex:outputField value="{!Contract.Files_PDF_Delivery_Date__c}"/>
                <apex:outputField value="{!Contract.Contact_Client__c}"/>
                <apex:outputField value="{!Contract.Approval_for_Printing_Date__c}"/>
                <apex:outputField value="{!Contract.Contact_Supplier__c}"/>
                <apex:outputField value="{!Contract.Delivery_Date__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Dane dot. tytułu">
                <apex:outputField value="{!Contract.Opportunity_Segment__c}"/>
                <apex:outputField value="{!Contract.Customer_Segment_Name__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Zakres prac">
                <apex:outputField value="{!Contract.Scope_of_Work__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Volume__c}"/>
                <apex:outputField value="{!Contract.Size__c}"/>
                <apex:outputField value="{!Contract.Paper_Body__c}"/>
                <apex:outputField value="{!Contract.Size_Unit__c}"/>
                <apex:outputField value="{!Contract.Paper_Cover__c}"/>
                <apex:outputField value="{!Contract.Packing__c}"/>
                <apex:outputField value="{!Contract.Colours__c}"/>
                <apex:outputField value="{!Contract.Finishing__c}"/>
                <apex:outputField value="{!Contract.Artwork__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Printing_form__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Print_run__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Finanse">
                <apex:outputField value="{!Contract.Prices_base_of_quotation__c}"/>
                <apex:outputField value="{!Contract.TOTAL_AMOUNT__c}"/> 
                <apex:outputField value="{!Contract.Standard_Payment_Term__c}"/>
                <apex:outputField value="{!Contract.MFG_value__c}"/> 
                <apex:outputField value="{!Contract.Incoterms__c}"/>
                <apex:outputField value="{!Contract.Paper_value__c}"/> 
                <apex:outputField value="{!Contract.Delivery_Terms_Additional_informations__c}"/>
                <apex:outputField value="{!Contract.Freight_Value__c}"/>
                <apex:outputField value="{!Contract.Additional_Notes__c}"/>
                <apex:outputField value="{!Contract.TOTAL_AMOUNT_1000__c}"/> 
                <apex:outputField value="{!Contract.Currency__c}"/>
                <apex:outputField value="{!Contract.MFG_Value_1000__c}"/> 
                <apex:outputField value="{!Contract.Refer_to_text__c}"/>
                <apex:outputField value="{!Contract.Paper_Value_1000__c}"/>
                <apex:outputField value="{!Contract.Refer_to__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Fakturowanie">
                <apex:outputField value="{!Contract.Other_Details__c}"/>
                <apex:outputField value="{!Contract.eInvoice_Email__c}"/>
                <apex:outputField value="{!Contract.Nomenclature__c}"/>
                <apex:outputField value="{!Contract.Agreed_to_eInvoice__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Informacja ogólna">
                <apex:outputField value="{!Contract.Competitive_Pricing__c}"/>
                <apex:outputField value="{!Contract.Specified_Plant_Location__c}"/>
                <apex:outputField value="{!Contract.Discount__c}"/>
                <apex:outputField value="{!Contract.Freight_Agreement__c}"/>
                <apex:outputField value="{!Contract.Rebate__c}"/>
                <apex:outputField value="{!Contract.Title_Transfer__c}"/>
                <apex:outputField value="{!Contract.Other_Incentive__c}"/>
                <apex:outputField value="{!Contract.Product_Storage_Days__c}"/>
                <apex:outputField value="{!Contract.Other_Incentive_Notes__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Paper_Supplier__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Informacje systemowe">
                <apex:outputField value="{!Contract.CreatedBy.Name}"/>
                <apex:outputField value="{!Contract.LastModifiedBy.Name}"/>
                <apex:outputField value="{!Contract.Status}"/>
                <apex:outputField value="{!Contract.RecordType.Name}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock title="Contract Detail" rendered="{!AND(displayDetails, Contract.RecordType.DeveloperName == 'QGE_Standard_Contract')}">

<!--        <apex:pageBlockButtons >
                <apex:form >
                    <apex:commandButton action="{!edit}" value="Edit"/>
                    <apex:commandButton action="{!delete}" value="Delete"/>
                    <apex:commandButton action="{!URLFOR($Action.Contract.Clone, Contract.Id)}" value="Clone"/>
                    <apex:commandButton action="{!URLFOR($Action.Contract.Activate, Contract.Id)}" value="Activate"/>
                    <apex:commandButton action="{!URLFOR($Action.Contract.Order_Confirmation, Contract.Id)}" value="Order Confirmation"/>
                </apex:form>
            </apex:pageBlockButtons>
 -->            <apex:pageBlockSection title="Contract Information">
                <apex:outputField value="{!Contract.Agreement_Format__c}"/>
                <apex:outputField value="{!Contract.Contract_Representative__c}"/>
                <apex:outputField value="{!Contract.Name}"/>
                <apex:outputField value="{!Contract.Account.Name}"/>
                <apex:outputField value="{!Contract.ContractNumber}"/>
                <apex:outputField value="{!Contract.Account_Number__c}"/>
                <apex:outputField value="{!Contract.Contract_Status__c}"/>
                <apex:outputField value="{!Contract.Background_Check__c}"/>
                <apex:outputField value="{!Contract.Previous_Contract__c}"/>
                <apex:outputField value="{!Contract.Data_Security__c}"/>
                <apex:outputField value="{!Contract.Currency__c}"/>
                <apex:outputField value="{!Contract.Non_Compete__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.No_Solicitation__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Term and Termination">
                <apex:outputField value="{!Contract.StartDate}"/>
                <apex:outputField value="{!Contract.Overall_Term_Length__c}"/>
                <apex:outputField value="{!Contract.Current_Term_Effective__c}"/>
                <apex:outputField value="{!Contract.Contract_Extension_Term__c}"/>
                <apex:outputField value="{!Contract.Current_Term_Signature__c}"/>
                <apex:outputField value="{!Contract.Early_Signature_Interval__c}"/>
                <apex:outputField value="{!Contract.EndDate}"/>
                <apex:outputField value="{!Contract.QG_Term_for_Convenience__c}"/>
                <apex:outputField value="{!Contract.Auto_Renew_Clause__c}"/>
                <apex:outputField value="{!Contract.QG_TFC_Days_Notice__c}"/>
                <apex:outputField value="{!Contract.Auto_Renew_Effective__c}"/>
                <apex:outputField value="{!Contract.Customer_Term_for_Convenience__c}"/>
                <apex:outputField value="{!Contract.Auto_Renew_Detail__c}"/>
                <apex:outputField value="{!Contract.Customer_TFC_Days_Notice__c}"/>
                <apex:outputField value="{!Contract.Auto_Renew_Notice__c}"/>
                <apex:outputField value="{!Contract.QG_Change_of_Control__c}"/>
                <apex:outputField value="{!Contract.auto_Renew_Notice_Notes__c}"/>
                <apex:outputField value="{!Contract.Auto_Renew_Extension__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Termination_Notice_Received__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Date_of_Termination__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Termination_Notice_Received_Notes__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="General Information">
                <apex:outputField value="{!Contract.Competitive_Pricing__c}"/>
                <apex:outputField value="{!Contract.Specified_Plant_Location__c}"/>
                <apex:outputField value="{!Contract.Discount__c}"/>
                <apex:outputField value="{!Contract.Comail_Terms__c}"/>
                <apex:outputField value="{!Contract.Rebate__c}"/>
                <apex:outputField value="{!Contract.Freight_Agreement__c}"/>
                <apex:outputField value="{!Contract.Other_Incentive__c}"/>
                <apex:outputField value="{!Contract.Title_Transfer__c}"/>
                <apex:outputField value="{!Contract.Other_Incentive_Notes__c}"/>
                <apex:outputField value="{!Contract.Product_Storage_Type__c}"/>             
                <apex:outputField value="{!Contract.Paper_Supplier__c}"/>
                <apex:outputField value="{!Contract.Product_Storage_Days__c}"/> 
                <apex:outputField value="{!Contract.Paper_Purchasing_Agreement__c}"/>
                <apex:outputField value="{!Contract.Billable_Overrun_Underrun__c}"/>
                <apex:outputField value="{!Contract.PPA_Effective_Date__c}"/>
                <apex:outputField value="{!Contract.Billable_Overrun_Underrun_Notes__c}"/>
                <apex:outputField value="{!Contract.PPA_Expiration_Date__c}"/>
                <apex:outputField value="{!Contract.Most_Favored_Nations__c}"/>
                <apex:outputField value="{!Contract.Paper_Reconciliation__c}"/>
                <apex:outputField value="{!Contract.Financial_Audit__c}"/>
                <apex:outputField value="{!Contract.Paper_Requirement_Adjustment__c}"/>
                <apex:outputField value="{!Contract.Other_Audit__c}"/>
                <apex:outputField value="{!Contract.Paper_Storage__c}"/>
                <apex:pageBlockSectionItem />
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Current Price List Dates">
                <apex:outputField value="{!Contract.Price_Schedule_Number__c}"/>
                <apex:outputField value="{!Contract.Other_Pricing__c}"/>
                <apex:outputField value="{!Contract.Prep__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.List__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Labor Escalation Detail">
                <apex:outputField value="{!Contract.Section_Reference__c}"/>
                <apex:outputField value="{!Contract.Escalation_Effective_Month__c}"/>
                <apex:outputField value="{!Contract.Escalation_Notice_Due__c}"/>
                <apex:outputField value="{!Contract.Escalation_Frequency__c}"/>
                <apex:outputField value="{!Contract.Escalation_Structure__c}"/>
                <apex:outputField value="{!Contract.Percent_of_Index_Allowed__c}"/>
                <apex:outputField value="{!Contract.Escalation_Notes__c}"/>
                <apex:outputField value="{!Contract.Referenced_Index_Month__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Referenced_Index_Title__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Cap_on_Increase__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Allowance__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Ink & Materials Escalation Detail">
                <apex:outputField value="{!Contract.Ink_Escalation__c}"/>
                <apex:outputField value="{!Contract.Material_Escalation__c}"/>
                <apex:outputField value="{!Contract.Ink_Notice_Due__c}"/>
                <apex:outputField value="{!Contract.Material_Notice_Due__c}"/>
                <apex:outputField value="{!Contract.Ink_Escalation_Notes__c}"/>
                <apex:outputField value="{!Contract.Material_Escalation_Notes__c}"/>
                <apex:outputField value="{!Contract.Ink_Escalation_Notes_Notes__c}"/>
                <apex:outputField value="{!Contract.Material_Escalation_Notes_Notes__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Workflow Solutions">
                <apex:outputField value="{!Contract.Workflow_Contract_Type__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Annual_Value__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Billing_Month__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Billing_Frequency__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Software__c}"/>
                <apex:pageBlockSectionItem />
                <apex:outputField value="{!Contract.Number_of_Licenses__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="System Information">
                <apex:outputField value="{!Contract.CreatedBy.Name}"/>
                <apex:outputField value="{!Contract.LastModifiedBy.Name}"/>
                <apex:outputField value="{!Contract.Pricebook2}"/>
                <apex:outputField value="{!Contract.Status}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    <apex:relatedlist list="Contracted_Customer_Segments__r" rendered="{!AND(contractedCustSegAccess, displayDetails)}" />
    <apex:relatedlist list="Agreement_Escalation_History__r" rendered="{!AND(agreementEscalationHistoryAccess,displayDetails)}" />
    <apex:relatedlist list="CombinedAttachments" rendered="{!AND(displayDetails, OR(Contract.RecordType.DeveloperName == 'QGE_Order_Confirmation',Contract.RecordType.DeveloperName == 'QGE_Standard_Contract'))}" />

</apex:page>



Thanks!