• Nilesh Jagtap (NJ)
  • SMARTIE
  • 1208 Points
  • Member since 2013

  • Chatter
    Feed
  • 38
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 9
    Questions
  • 199
    Replies
I am able to display a report on a vf page using the below code, I am hiding the refresh button, now I want to refresh the report for every n seconds or whenever the user opens that visualforce page. 

<apex:page>
<analytics:reportChart reportId="00Oj0000001JKgL" size="small" showRefreshButton="false" />
</apex:page>
I am receiving an error when I use the render parameter in my apex:outputText.  This library says that the render can handle a boolean or a formula.  Maybe I am not getting my formula correct:

Here is the code:

    <div id="field84f" style="position:absolute; font-weight: bold; color:BLACK; font-size:6pt; top:635px; left:495px;width:150px;">      
        <apex:outputText value="{0,number,###,###,###}" <strong>rendered="{!IF(Certificate__c.AL_Any_Auto__c=true,"true","false")}"</strong> >    
         AGGREGATE $<apex:param value="{!Certificate__c.OT_Aggregate__c}" />
        </apex:outputText>      
    </div>

Here is the error:

Error Error: CertForm line 398, column 57: Element type "apex:outputText" must be followed by either attribute specifications, ">" or "/>"
Error Error: Element type "apex:outputText" must be followed by either attribute specifications, ">" or "/>".

When I remove the <strong>rendered="{!IF(Certificate__c.AL_Any_Auto__c=true,"true","false")}"</strong> the VF page saves without errors.

Thank you for your help.
Hi folks,
        Can anyone tell me what are the type of accounts(gmail,yahoo and etc) we can add to outlook for salesforce outlook integration???

If  gamil account is support then how to integrate outlook with salesforce??

Thanks in advance

Karthick




Hi Everybody,
    Can anyone tell me the folllowing code reach governor limit if my org has 400 user and each user manager is next user..
example
user1----->user2(manager of user1)---->user(manager of user2)------>user3(manager of user3)........---->user400(manager of user 399)

Code Is:
public static List<Id> getAll(List<Id> ids){
List<Id> mIds = new List<Id>();
for(user u : [select ManagerId from user where id in:ids and ManagerId!=null])
  mIds.add(u.ManagerId); 
 if(mIds.size()>0)
    mIds.addAll(getAll(mIds));
return mIds;
}
If it hits then how to avoid??

Please Help!
Hi all,

Can some one help me to answer this with reason ?


Which of the following is NOT a step in creating a junction object?
a. Creating the custom object to serve as the junction object between the two master objects
b. Creating two Master-Detail relationships
c. Customizing the related lists on the page layouts of the two master objects
d. Creating two lookup relationships

Thanks in advance,
Manu
Hi

After moving to PROD in Opportunity custom  fields defalut value is not displaying of few Opportunity.why?

Thanks in Advance

I'm looking to create a single list of records of various sObject types using apex to display to a custom visualforce page. I'm wondering if there is a way to combine multiple objects (case, opportunity, account, etc) within a single list. If not, how do you append the second object to the first in a list using visualforce code? Is there a best practice?

 
I need to show list of open cases for logged in  user so i used below query & it does not work.It does not show any cases. I am using Java Script & HTML5 .

 var sreas = UserInfo.getUserID();

SELECT Id, AccountId, CaseNumber, OwnerId, Reason, Status, Subject, Description, ContactId, Priority, Origin from Case WHERE OwnerId = \''+sreas+'\' Order by CaseNumber asc

  • August 25, 2014
  • Like
  • 0
We have created a site using site.com. Now we want to delete the entire site but before deleting this site we need to take a back up for all the templates and pages(Meta Components). How we can take the backup for site.com?. I am not seeing any option for taking the backup from site.com. If anybody can help me in achieving this it would be great.
hai
here i created to different recod types for opportunity object.so when i want to create new opportunity record it first asks me record type selection .so how can i skip this page when creating new record?
Hi,

I'm working on a custom object which requires me to replace the standard edit page of the same with a VF page. Once the "Edit" button is clicked on the detail page (Salesforce standard detail page), it should redirect to the VF page.

However, I require the id of the object to be passed as a parameter to the VF page.

I'm able to override the "Edit" button with the VF page, but not able to pass the Id as a parameter. As a result, it is not working properly for me.

If anyone can point me in the right direction on how to do this, will be very helpful..!!

Regards,
~Ayan
Hi i have a simple table need to add to Contact object which will show top 5 cases from that contact sort by case number.

i need to create a visualforce page table to display 4 columns:

1) Case Number
2) Case Subject
3) Origin
4) Status

I wanted the Case Number to be clickable meaning if i click on the case number it will direct me to the case details

any suggestion?
My question is of a specific and general nature.  First the specific aspect.  I have the following code in my controller:

public class ListVisableCategories {

    // INSTANTIATE CONTROLLER
    
    public ListVisableCategories(){}
    

    // SET VARIABLES
    
    public Set<String> setRootCat{get;set;}
    public String prefix = Site.getPathPrefix();
    
    
    // DESCRIBE VISABLE CATEGORIES
    
    public static List<String> describeVisibleCategories(Map<String, String> mLabelCat, Map<String, List<String>> mCatStructure, Map<String, String> mParentCategory){
    
        if (prefix == '/xyz') {
    
            Set<String> setRootCat = new Set<String>{'Buyer_Articles'};
        }
    
        else if (prefix == '/abc') {
    
            Set<String> setRootCat = new Set<String>{'All'};
        }

        List<String> listVisableCategories = new List<String>();
        
         ........
            
            // IF APPLICABLE, GATHER ALL CHILD CATEGORIES
            
            if(setRootCat.contains(dc.getName())){
            
                for(DataCategory dcChild : dc.getChildCategories()){ 
                
                    listVisableCategories.add(dcChild.getName());
                }
            }
            
            else{
    
                listVisableCategories.add(dc.getName());
            }
        }
    
        return listVisableCategories;
    }

}

Ignoring other aspects of the code that may be missing (I didn't paste the entire controller) why in the world is it giving me a Compile Error for both the "setRootCat" and "prefix" variables saying that they "don't exist"?  Both variables are declared public.  Shouldn't I be able to access them later in the controller?

The general aspect of my question is why Apex doesn't allow simple usage of a variable across various functions in a class.  PHP, Java, Javascript...they all allow this, but declaring and using variables in various Apex methods in a class seems very cumbersome.  Maybe I'm missing something simple?

Thanks ahead of time!
Hi Folks ,

Can any one help me out ? How can i acheive this Requirement thru Validation Rule???i shall appreciate your help. 

Its very urgent


ON CASE OBJECT :

When PROFILE  name with "Application users"  creates a case ,then the Assigned agent name should be the username who is creating ,
Profile names other than Application Users  creates a case ,then the Assigned agent name should be the  moved into Unassigned queue who is creating
.

Thanks in Advance.
  • August 05, 2014
  • Like
  • 0
<apex:page standardController="Contact"  extensions ="custom_controller_name" >
<apex:form >
<apex:pageBlock title="Contact">
<apex:pageMessages />
<apex:pageBlockSection >
<apex:inputField value="{! contact.accountid}"/>
<apex:inputField value="{! contact.phone}"/>
<apex:inputField value="{! contact.FirstName}"/>
<apex:inputField value="{! contact.LastName}"/>
<apex:inputField value="{! contact.Fax}"/>
<apex:inputField value="{! contact.Email}"/>
<apex:inputField value="{! contact.title}"/>
<apex:inputField value="{! contact.phone}"/>

<apex:inputField value="{! contact.HomePhone}"/>
<apex:inputField value="{! contact.Department}"/>
<apex:inputField value="{! contact.Birthdate}"/>
<apex:inputField value="{! contact.MobilePhone}"/>



<apex:commandButton action="{! save }" value="save"/>

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

when i save this  it goes to the standard page

i want that when i save this it should open like
/apex/MyFormContact?id=00190000010HAtb (view mode)  and not        https://ap1.salesforce.com/00390000013dAX7

apex: class

public class custom_controller_name{
public Contact contact {get;set;}
public pagereference save(){
try{
insert contact;
}catch(Exception e){}
Pagereference pref = new pagereference('/apex/MyFormContact?id=' + contact.id);
pref.setredirect(true);
return pref;

}
}
it gives error :Error: Unknown constructor 'custom_controller_name.custom_controller_name(ApexPages.StandardController controller)'
Hi Everybody,
     Can anyone tell me the life cycle of salesforce objects(Mentioned below.. especialy the objects in Bold) and  where its starts  and Where its ends with sample example
Campaign,Lead,Account,Contact,Opportunity,Product,Quotes,orders,Contract,cases and solution..
please help!
Hi,

I am trying to perform dynamic search with sosl but gettig 0 rows.
For same query it is returning 4 rows on workbench.
here is the code snippet for refernce:
list<String>lstNames = new list<String>{'Brain-Prick@gmail.com','Dorsy.Young@coe.com', 'nj-sf@dev.com'};
	String searchquery='FIND {'+ getNames(lstNames) +'} IN ALL FIELDS RETURNING Account(Id,Name),Contact(Id,Name), Lead(Id, Name)'; 
 
	public string getNames(list<string> lstNames){
        String nameList ='';
        for(String name:lstNames){
            //escape hyphen
            if(name.indexof('-')>=0){
                name = name.replace('-', '\\-');
            }
            nameList = nameList + name + ' OR ';
        }
        
        nameList = nameList.substringBeforeLast('OR').trim();
        
        return nameList;
    }

Thanks,
N.J
 
We have unmamanged package in production as 'abc_unmanaged'
We have installed appexhcnage product, while unistalling this product we are getting dependency on unmanaged package.

User-added image


is there any we I can remove dependency in sandbox?


Thanks,
N.J
Hi,

How can I open vf page in custom HTML page.


Thanks.
Hi Folks,

We are setting subtab icons using console toolkit methods while opening vf pages in subtabs.
Do we have any mechanism to retain sub tab icons when we refresh the console.

Thanks In Advance !!
hi,

Can anybody suggest me few ideasfor impleamenting and learning web services.
I am new to web services implementation and want to learn by starting with simple integrations.
Any help would be appreciated.

Thanks.
Hi,

how to get available related lists names for any object?


Thanks,
N.J
hi everyone,

Escape Page Layout Section Name not working after summer 14 upgrade.
Anyone knows how can I re-enable this.

Thanks !!
N.J
Hi All,

I am facing issue with my VF page which is used to send attachment via emails.
If I upload attachment of size lesser then 10 MB then it works fine but if I upload attachment with size more than 10 MB then in controller I am getting attachment.name and attachment.body as NULL

Thanks In Advance.
I am not able to see any error in eclipse while saving. It only shows "Files saved locally".
I facing this issuw since summer 14 release.
Anyone else facing same kind of issues?
Hi guys,

I'm trying to diplay piece of HTML in a rich text area field.

The problem is that it dispayes it as a pure HTML with all the tags,

Here is the HTML I'm trying to insert :

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p><strong>Related issues</strong></p>
<table class="list issues">
<tr class="issue hascontextmenu" id="relation-15556">
<td class="checkbox">*</td>
<td class="subject">
Related to
SX-IB -
<a href="/issues/20226" class="issue tracker-28 status-5 priority-6 priority-lowest closed assigned-to-my-group issue status-30 closed">Bug SW #20226</a>: error message in /var/log/messages: &quot;Failed to get port c...
</td>
<td class="status">Closed</td>
<td class="start_date">04/06/2012</td>
<td class="due_date"></td>
<td class="buttons"><a href="/relations/15556" data-confirm="Are you sure?" data-method="delete" data-remote="true" rel="nofollow" title="Delete relation"></a></td>
</tr>
<tr class="issue hascontextmenu" id="relation-15557">
<td class="checkbox">*</td>
<td class="subject">
Related to
SX-General -
<a href="/issues/365651" class="issue tracker-28 status-38 priority-6 priority-lowest closed assigned-to-my-group issue status-32 closed">Bug SW #365651</a>: [ibd.WARNING]: Failed to get port counters rcv_data MAD_...
</td>
<td class="status">Closed (Rejected)</td>
<td class="start_date">08/01/2014</td>
<td class="due_date"></td>
<td class="buttons"><a href="/relations/15557" data-confirm="Are you sure?" data-method="delete" data-remote="true" rel="nofollow" title="Delete relation"></a></td>
</tr>
</table>
</body>
</html>

Anybody ? 

Thanks !!
I am getting this error in my code:
Non-void method might not return a value or might have statement after a return statement.
My code is as under:
public class AccountHandler {
    public static Account insertNewAccount(String AcctName)
    {
        Account acct = new Account();
        acct.Name = AcctName;
        if(acct.Name == null)
        {
            return null;
        }
        else
        {
               return acct;
        }
     }
}
Previously I have written some code on a trial site. Unfortunately, the site became production before I had a chance to complete the test code. Now I continue to develop the code on a sandbox but it can't be deployed back to the production site since it keeps saying the code coverage on the production site is lower than 75%. How can I get this fixed and deploy the code?
I am able to display a report on a vf page using the below code, I am hiding the refresh button, now I want to refresh the report for every n seconds or whenever the user opens that visualforce page. 

<apex:page>
<analytics:reportChart reportId="00Oj0000001JKgL" size="small" showRefreshButton="false" />
</apex:page>

Hi, 

I'm trying to create a trigger that checks a lead's email domain when it is created. If this email domain matches an exisiting account domain, then the lead owner gets set to that corresponding account owner. However, I am getting the following error: 

Apex trigger AssignNewLeadToAccount caused an unexpected exception, contact your administrator: AssignNewLeadToAccount: execution of BeforeInsert caused by: System.DmlException: Update failed. First exception on row 0; first error: MISSING_ARGUMENT, Id not specified in an update call: []: Trigger.AssignNewLeadToAccount: line 21, column 1

Here is the trigger code: 

trigger AssignNewLeadToAccount on Lead (before insert)  {

	public list<Lead> LeadsToUpdate = new List<Lead>();

	Map<string,Id> DomainAccountMap = new Map<string,Id>();
    
    for (Account a :[SELECT ownerID, Email_domain__c FROM Account WHERE Email_domain__c != null]) {
		DomainAccountMap.put(a.email_domain__c, a.ownerId);
    }

    for(Lead l : Trigger.new) {
        ID owner = DomainAccountMap.get(l.Email_domain__c);
        if(owner != null) { 
            Lead lead = new Lead(Id=l.Id, OwnerID = owner); 
            LeadsToUpdate.add(lead);
            l.Skip_Lead_Assignment__c = true; 
        }  
    }
    
    if(LeadsToUpdate.size() > 0){
        update LeadsToUpdate;
    }
}
Any help is appreciated. Cheers
  • October 01, 2014
  • Like
  • 0
I am receiving an error when I use the render parameter in my apex:outputText.  This library says that the render can handle a boolean or a formula.  Maybe I am not getting my formula correct:

Here is the code:

    <div id="field84f" style="position:absolute; font-weight: bold; color:BLACK; font-size:6pt; top:635px; left:495px;width:150px;">      
        <apex:outputText value="{0,number,###,###,###}" <strong>rendered="{!IF(Certificate__c.AL_Any_Auto__c=true,"true","false")}"</strong> >    
         AGGREGATE $<apex:param value="{!Certificate__c.OT_Aggregate__c}" />
        </apex:outputText>      
    </div>

Here is the error:

Error Error: CertForm line 398, column 57: Element type "apex:outputText" must be followed by either attribute specifications, ">" or "/>"
Error Error: Element type "apex:outputText" must be followed by either attribute specifications, ">" or "/>".

When I remove the <strong>rendered="{!IF(Certificate__c.AL_Any_Auto__c=true,"true","false")}"</strong> the VF page saves without errors.

Thank you for your help.
I have the following requirement :

object : Product
fields: 
1. New (checkbox)
2. Old ( checkbox)
3. Sold(checkbox)
4. Out of stock(checkbox)
5.Item (lookup to Itemsale)

object: Itemsale

1. New (checkbox)
2. Old ( checkbox)
3. Sold(checkbox)
4. Out of stock(checkbox)

how to write the trigger so that atleast one record of itemsale has "New" checked then it will update parent field "New" as checked?

Hi folks,
        Can anyone tell me what are the type of accounts(gmail,yahoo and etc) we can add to outlook for salesforce outlook integration???

If  gamil account is support then how to integrate outlook with salesforce??

Thanks in advance

Karthick




I have a test class in production that is failing because it's pulling back too many records.  In the sandbox, I fixed it by just limiting the SOQL query.  However, when I try to push it to production via a change set, it fails because the test class I'm trying to replace fails in production.... which of course it does, that's why I'm trying to replace it!

How do I properly push this change to production?

 Hi,

I am having the notes and attachments section as a related list on a custom object,


on save i have a trigger which is firing a approval process on my customobject

my scenario is when no record is attached under notes and attachment it should throw an error befre save "please enter value for notes and attachment" preventing the approval process not to fire


if attachment is present then no error should be thrown and record can be saved


can a validation rule help on this case

let me know how to do it

below is my trigger for approval process

trigger SubmitForApproval on Special_Programs_ADR_Exception__c (after update, after insert) {
    try{
        for (Integer i = 0; i < Trigger.new.size(); i++) {
            if (Trigger.new[i].RoutenotifytoSalesSpecialist__c !=null && Trigger.new[i].DOSUser__c !=null && Trigger.new[i].RVP_Approver__c !=null) {

                // create the new approval request to submit
                Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
                req.setComments('Submitted for approval. Please approve.');
                req.setNextApproverIds(new List<Id>{trigger.new[i].ownerId});
                req.setObjectId(Trigger.new[i].Id);
                
                // submit the approval request for processing
                Approval.ProcessResult result = Approval.process(req);
                
                // display if the reqeust was successful
                System.debug('Submitted for approval successfully: '+result.isSuccess());
            }
        }
    }catch(System.DMLException e) { }
}




Thnks in advance

Hi,

I am creating a formula number field which should accept only month and year

mm/yyyy format

and not date

let meknow the formula to use


Thanks in Advance




Hi,

I am new to Jquery. Can any one pls help me how to write code for getting popup window and for closing popup.



Thanks,
Anitha
I would like to ask you, the below SOQL query why is non-selective query?

SELECT Id, Name, E_mail__c, E_mail_2__c, Phone, mobilephone__c, Telefhone_3__c, Description, OwnerId, Owner.UserRole.Name
FROM Account
WHERE EXT_ID__c = '1' AND (E_mail__c = :var1 OR E_mail_2__c = :var1)

The total count of Accounts is 101000.
The count of Accounts where ext_id__c = '1' is 99000.
The count of Accounts where ext_id__c = '2' is 2000.
The EXT_ID__c is external id, not requied and not unique.
The var1 is not nullable.

If I filter ext_id__c to '1', it throws QueryException, but if '2' not throw.

Apex trigger Web2Lead caused an unexpected exception, contact your administrator: Web2Lead: execution of BeforeInsert caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times): Class.Web2LeadHandler.RealtedAccount: line 190, column 1
  • August 28, 2014
  • Like
  • 0
Hi Everybody,
    Can anyone tell me the folllowing code reach governor limit if my org has 400 user and each user manager is next user..
example
user1----->user2(manager of user1)---->user(manager of user2)------>user3(manager of user3)........---->user400(manager of user 399)

Code Is:
public static List<Id> getAll(List<Id> ids){
List<Id> mIds = new List<Id>();
for(user u : [select ManagerId from user where id in:ids and ManagerId!=null])
  mIds.add(u.ManagerId); 
 if(mIds.size()>0)
    mIds.addAll(getAll(mIds));
return mIds;
}
If it hits then how to avoid??

Please Help!
I have a problem with string spliting that when i create a pdf the table is excceding because of 'description' so i want to split that 'description' string i am trying to do it but unable to fix it i am sending the contrlooer and visualforce code can any try to help me out...

MY controller:

public class QuotePDFAustria{
   
    Public Quote qut{get;set;}
    Public List<QuoteLineItem> QuLiIt{get;set;}
    Public Date dat{get;set;}
   
    Public QuotePDFAustria(ApexPages.StandardController controller){
        qut = [SELECT id,name,Payment_Terms__c,Notes__c,Customer__r.name,Customer__r.City__c,Customer__r.State__c,Customer__r.Postal_Code__c,Customer__r.Country__c,GrandTotal,Quote_Address_To__r.name,Quote_Address_To__r.Salutation,Quote_Address_To__r.LastName,Quote_Address_To__r.email,Quote_Address_To__r.Phone,Opportunity.Primary_Inside_Sales__r.name,Primary_Inside_Sales__r.name,Primary_Inside_Sales_Email__c,Quote_Date__c,opportunity.Primary_Outside_Sales__r.name,opportunity.Primary_Outside_Sales__r.Phone,opportunity.Primary_Outside_Sales__r.Email,opportunity.Primary_Outside_Sales__r.fax,opportunity.Primary_Outside_Sales__r.Title,Inside_Sales_Fax__c,Inside_Sales_Phone__c,Inside_Sales_Title__c FROM Quote WHERE id =: ApexPages.CurrentPage().getParameters().get('id')];
        QuLiIt = [SELECT id,LineNumber,Quantity,Item_Number__c,Asset__r.Model__c,Part_Description__c,UnitPrice,Asset__r.SerialNumber FROM QuoteLineItem WHERE QuoteId =: qut.id];
        if(qut.Quote_Date__c != null)
        dat = qut.Quote_Date__c + 30;
    }
}


 and my Visualforce page:

<apex:page standardController="Quote" extensions="QuotePDFAustria" renderAs="pdf">
   <head> 
        
    <style type="text/css">       
        @PageBreak{
            page-break:always;
            page-break-inside:avoid;
        }      
        @media print{
            table {page-break-inside:auto }
            tr    { page-break-inside:avoid; page-break-after:auto }
        }         
        @page {   
            margin-top: 20%;  margin-bottom: 110px; 
            margin-left:50px; margin-right:50px;
            @top-center {                  
                content: element(header);              
            }
            @bottom-left {
                content: element(footer);
                height: 500px;
            }          
        }
        div.footer {  
            position: running(footer);
        }                                  
        div.header { 
            margin:0 50px 0 0;                        
            position: running(header);          
        }
         table.gridtable {
         font-family: verdana,arial,sans-serif;
         font-size:15px;
         color:#000;
         border-width: 1px;
         border-color: #000;
         border-collapse: collapse;
        }
        table.gridtable th {
         border-width: 1px;
         padding: 8px;
         border-style: solid;
         border-color: #000;      
        }
        table.gridtable td {
         border-width: 1px;
         padding: 8px;
         border-style: solid;
         border-color: #000;
        }                                          
       
    </style>
</head>  
    <div class="footer">
        <table  border="0" width="100%" height = "100%" cellspacing="0" cellpadding="0">
            <tr>
                <td width="70%" >
                    <b>CCI Valve Technology GmbH</b><br/>
                       Lemböckgasse 63/1<br/>
                       AT-1230 Vienna<br/>
                       Austria
                </td>
                <td width="30%">
                       Tel.: +43-1-869 27 40<br/>
                       Fax : +43-1-865 36 03<br/>
                       <b>www.ccivalve.com</b><br/>
                       e-mail : cci@ccivalve.at
                </td>
            </tr>
        </table>
    </div>

    <div class="header" align="center" >       
        <div><apex:image height="110px" width="230pk" value="{!$Resource.CC_IMI}"/></div>
    </div>
   
    <apex:form >
        <!-- This Section is for PAGE 1-->
        <table class="gridtable" width="100%">
            <tr>
                <td colspan="2" width="50%" style="vertical-align:Top;padding-top:5px;padding-left:20px;">
                    <u><apex:outputText value="Customer :"/></u>
                    <p><b>{!qut.Customer__r.name}</b><br/>
                        {!qut.Customer__r.City__c}<br/>
                        {!qut.Customer__r.State__c}&nbsp;{!qut.Customer__r.Postal_Code__c}<br/>
                        <b>{!qut.Customer__r.Country__c}</b>
                    </p>
                </td>
                <td colspan="2" width="50%" style="vertical-align:Top;padding-top:5px;padding-left:20px;">
                    <u><apex:outputText value="Supplier :"/></u>
                    <p><b>CCI Valve Technology GmbH</b><br/>
                        Lemböckgasse 63/1<br/>
                        AT-1230 Vienna<br/>
                        <b>Austria</b>
                    </p>
                </td>
               
           
           
        </table><br/>
        <table width="100%" class="gridtable">
            <tr align="center" style="background-color:#C0C0C0;">
                <th width="50%" style="padding-top:10px;padding-bottom:10px"><apex:outputText value="QUOTATION No.:"/></th>
                <th width="50%" style="padding-top:10px;padding-bottom:10px"><apex:outputText value="{!qut.name}"/></th>
            </tr>
        </table><br/><br/>
       
        Dear {!qut.Quote_Address_To__r.Salutation}&nbsp;{!qut.Quote_Address_To__r.LastName},<br/><br/>
        We thank you for your inquiry and offer in accordance with the previous order ............... with the negotiated
        purchase and warranty conditions as follows.<br/><br/><br/>
       
        When ordering, we ask you to refer to the old order and confirm the validity if this purchasing and
        warranty conditions.<br/><br/>
       
       
        <table width="100%" class="gridtable">
            <tr align="center" style="background-color:#C0C0C0;page-break:after:auto;page-break-inside:avoid;">
                <td width="5%" style="padding-top:10px;padding-bottom:10px">Pos.</td>
                <td width="5%" style="padding-top:10px;padding-bottom:10px">Q</td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px">Article No.</td>
                <td width="40%" style="padding-top:10px;padding-bottom:10px">Description</td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px">USD/pc</td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px">USD/Pos</td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px">SL No.</td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px">Valve Type</td>
            </tr>
            <apex:repeat value="{!QuLiIt}" var="qli">
            <tr style="page-break:after:auto;page-break-inside:avoid;">
                <td width="5%" style="padding-top:10px;padding-bottom:10px"><apex:outputText value="{!qli.Item_Number__c}"/></td>
                <td width="5%" style="padding-top:10px;padding-bottom:10px"><apex:outputText value="{!qli.Quantity}"/></td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px"><apex:outputText value="{!qli.LineNumber}"/></td>
                <td width="40%" style="padding-top:10px;padding-bottom:10px"><apex:outputText value="{!qli.Part_Description__c}"/></td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px"><apex:outputText value="{!qli.UnitPrice}"/></td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px"><apex:outputText value="{0,Number,###,###,###.00}"><apex:param value="{!qli.UnitPrice * qli.Quantity}"/></apex:outputText></td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px"><apex:outputText value="{!qli.Asset__r.SerialNumber}"/></td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px"><apex:outputText value="{!qli.Asset__r.Model__c}"/></td>
            </tr>
            </apex:repeat>
            <tr style="background-color:#C0C0C0;page-break:after:auto;page-break-inside:avoid;">
                <td width="5%"></td>
                <td width="5%"></td>
                <td width="10%"></td>
                <td width="40%" style="text-align:right;padding-top:10px;padding-bottom:10px"><b>TOTAL</b></td>
                <td width="10%" style="padding-top:10px;padding-bottom:10px">USD/pos.</td>
                <td width="10%"><apex:outputText value="{0,Number,###,###,###.00}"><apex:param value="{!qut.GrandTotal}"/></apex:outputText></td>
                <td width="10%"></td>
                <td width="10%"></td>
            </tr>
        </table>
       
       
       
       
       
    </apex:form>
</apex:page>
Hi Force devs

Can we lock the record order from the apex code. not from approval process.

Rgrds
SR