• hemantgarg
  • NEWBIE
  • 445 Points
  • Member since 2010

  • Chatter
    Feed
  • 14
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 198
    Replies

I am getting error while running Tests 

 

  /**
      * Method that creates the test estimate object
      */
     public static Services_Estimate__c createTestEstimate(){
         Product2 prod = [SELECT ID, NAME FROM Product2 WHERE NAME = 'BASE24-eps'];
        
        Services_Demand_Management__c dm= new Services_Demand_Management__c (Name = 'MyTestEstimate',
                                  Request_Status__c = DemandManagementHelper.STATUS_NEW,
                                  Request_State__c = DemandManagementHelper.STATE_OPEN,
                                  Comments__c = 'My Desc',
                                  ACI_Product1__c = prod.Id,
                                  Request_Type__c = 'Services',
                                  Oracle_Project_Number__c = 'TP00001',
                                  Oracle_Project_Name__c = 'Test Project',                                  
                                  Request_Sub_Type__c = ServicesEstimateHelper.IAE_FULL,
                                  Request_Submitter__c = UserInfo.getUserId());
         insert dm;

         Services_Estimate__c est= new Services_Estimate__c(Name = 'MyTestEstimate',
                                        Estimate_Status__c = DemandManagementHelper.STATUS_NEW,
                                        Request_Description__c = 'My Desc',
                                        Demand_Management_Request__c = dm.Id);
                                        
         
         insert est;
         
         Services_Review_Meeting__c meeting = new Services_Review_Meeting__c(Estimate_In_Review__c = est.Id,
                                        Meeting_Date__c = Date.today(),
                                        Meeting_Description__c = 'Review IA',
                                        Meeting_Goal__c = 'Reach Agreement',
                                        AD_Comments__c = 'Done',
                                        AD_Review_Disposition__c = 'Agree',
                                        Product_Review_Disposition__c = 'Agree',
                                        Sales_Review_Disposition__c = 'Agree',
                                        Services_Review_Disposition__c = 'Agree');
         insert meeting;
         return est;
        
     }
     
     public static testMethod void testReadEstimate(){
         
         Services_Estimate__c est= createTestEstimate();                                   
         
         readEstimates(est.Demand_Management_Request__c);
         readEstimate(est.Id);
         readEstimateItems(est.Id);         
         readReviewMeetings(est.Id);
         readEstimateFunctionalFeatureMappings(est.Id);
      
     }


}

 Message shows that error occurs at Line 252 which is line below , but this query is returning a single result ,I am not sure why this error is appearing. Can some one pls. help me ? 

Product2 prod = [SELECT ID, NAME FROM Product2 WHERE NAME = 'BASE24-eps'];

Hello everyone,

 

I have created a JavaScript button which is creating a curious effect. Upon clicking the button, it should create a task alerting another user that a lead is ready for their review. The fields should auto populate with the other users Name and Lead info through the use of a URL hack.

 

Instead, when the task is created, it notifies the creator of the task and attaches to a Contact of the same name as the lead. I find that if I click the magnifying glass next to the Assigned to User Field and the Name Lead field it works correctly. Any idea what might cause this or how to correct it?

 

Below is the button code. Thank you for your help,

 

if ({!Lead.Description} == "ceuenrollment") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=CEU%20Order";
}

else if ({!Lead.Description} == "certrenew") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Cert%20Renewal";
}

else if ({!Lead.Description} == "certreplace") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Replacement%20Display%20Certificate%20Request";
}

else {
alert("This lead can not be marked as paid.");
}

We have a Long Text Area custom field on Account called "Account Notes" would like to display that on page layout of Contacts related to that Account but can't figure out how to do so. I attempted to use a forumla field to display it but Long Text Area fields aren't allowed there so I am stuck. Any ideas on how to do this would be much appreciated. 

 

Thank you!

Hi,

   I would get the values from dynamic soql query. here in detail  

   XmlRD__c queryResult = Database.query('Select \''+field +'\' from XmlRD__c where id = \''+ recordid +'\'');
              
   String Text = String.valueof(queryResult.field);


   Here the red marking field values getting dynamically changing. i want to get the dynamic field value. but here throwing the issue. How can i get.            

  • December 29, 2011
  • Like
  • 0

hii,


System.SerializationException: Not Serializable: ApexPages.Message 

 

i initialze message object as a class variable....what should i have to do to remove this exception?

 

tahnks

Hi team,

 

I am trying to figure it out if this is possible?

 

WebService static string updateOpportunity(string oppId, string fieldName, string fieldValue)
        {
        	try
            {   
            	integer i = Database.countQuery('select count() from Opportunity where Id = :oppId');
            	if (i > 0) {
	        Opportunity o = [select :fieldName from Opportunity where Id = :oppId limit 1];
	        	o.fieldName = fieldValue;
	        	update o;
	        	return 'OK';
            	}	        		        
          	}	
           	catch (DmlException e) {                       
           		return string.valueof(e); 
           	}        
        }

 

someone gets the idea... is this possible?

 

please post or sms me.

 

Hi all anyone see what stupid mistake im making here?

 

Ive got a map:

 

map<string, Consultant__c> ConsultantMap = new map<string, Consultant__c>([select name, id from Consultant__c]); //this seems to work fine.


and all i want to do is use the value from a pick list as the key, so if i select 'Darth Vader' it uses that as the key and gets me the id.

 

now i've tried:

 

UsersId = ConsultantMap.get(pa.Login_As__c).id;

 

and even

 

Consultant__c X = ConsultantMap.get('Darth Vader');

system.debug('X' + X.Id);

 

but every time it fails and the id is null. yet the map is populated ok. I dont get what im going wrong.

 

Thanks All


Hi im trying to find an alternative to

<apex:page standardcontroller="Shipment" action="{!agree}">

</apex:page>

 by using apex:actionFuntion so that the code looks something like this

<apex:page standardcontroller="Shipment" >
some code...
...
<apex:actionFucntion name="agree" action="{!agree}"/>

</apex:page>

 can someone help me?

I would like to know how one would use the get() method attached to Objects. It seems like something that I might want to use. 

Hi Everybody,

 

I have created a VF page ccontroller(i.e a Apex class) which is returning a String Variable containing some HTML content,

 

But when i am displaying that String variable in VF page , it is showing the output in different format.

 

Example--

 

Apex class Code

 

String HTMLContent='<b>Hello World</b>'

 

public String getContent(){

return HTMLContent;

}

 

VisualForce Page Code

 

{!Content}

 

It is showing the output like that  "<b>Hello World</b>" 

But i want to display the Hello World in bold letter(like html format)

 

When i am execute and view the Page output in FireBug, The String is like that

 

&lt;b&gt;Hello World&nbsp&lt;/b&gt;

 

 

I need help,

  • October 14, 2011
  • Like
  • 0

Hi,

 

I have a Visualforce page that lists all the products for a given opportunity in a apex:pageBlockTable

 

I want to add a column called "Quantity to order" which will be used in my controller to create some new objects. This field does not exist in the OpportunityLineItem object.

 

How do I add an additional inputText field to my pageBlockTable and have it bound to my controllerExtension, when it is not actually a field in Salesforce?

 

Ideally I'd like to programatically add a new Integer to the Opportunity.OpportunityLineItems List.

 

Thanks,

-Jev

  • September 10, 2011
  • Like
  • 0

Hi,

 

Within ym user object I have reference fields such as  "Approval Manager ". This field is a refence to the user object & by entereing a user id it displays the user's name as the manager.

I wish to set this value to empty using APEX code if data I retrieve (from a source external to SFDC) indicates no Approval Manager is provided.  I receive an error saying I'm assigning an invalid ID

 

my 2 lines of code are

 

usr.Approval_Manager__c='';

update usr;  

 

Does anyone know if I can set this to blank threfore?

 

Thanks

I have a confirmation dialog with Ok and Cancel button. When user clicks OK I would call server action to proceed and on cancel no server call is necessary.

 

I want to use the apex:commandButton for both to make sure that they use the same css style. Even if I do not have the action parameter the command submits a call to the server. 

 

 

 

  • August 29, 2011
  • Like
  • 0

I have a requirement to allow third party lead providers to post XML lead data to our application and convert that into a custom object. I currently have it working by having the test client application attach the XML string as a query parameter:

(&leaddata=< ... xml ... />), and sending the httprequest without anything in the body of the post.

 

However, I don't think this is the expacted (or correct) way to post data to the site page. I would think the correct method would be to add the XML in the body of the "POST". The page controller uses the "getParameters()" method then uses the XML Dom to parse the XML. Everything works well after that.

 

My question is:

How would I get hold of the incomong HTTPRequest in the page controller to grab the body of the request?

 

I would expect something like this:

 

public MyController
{
  private string XmlString;
  public MyController()
  {
    HTTPRequest IncomingRequest = Pages.CurrentPage.GetRequest();
    Blob BodyBlob = IncomingRequest.getBody();
    XmlString = BodyBlob.ToString();
  }
}

 

Can anyone give some insights on how to connect to gmail from Salesforce ?

Hi, I followed below post to mock a webservice callout for test class :- http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm but it does not seem to work, is there any other setting required to make it work ? API Version is 26.0 and I am doing it on developer edition. It is still throwing error saying "System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out " Can anyone please help me ? Thanks in advance .

Can we check map contains key on visualforce page ?

If we use a formula field in another formula field, then will it decrease the compiled size of second formula field?

 

Actually I am working on a formula field which is giving me error of exceeding compiled size, to overcome this error,

I created a small formula field and want to use it in my original field.

I was thinking that it can decrease the compiled size, but it does opposite, it increased the compiled size. can anyone suggest how to minimize the compiled size of a formula field ?

Force.om migration tool is great tool for deployment, I found it faster than any other method, But there is one issue , in case if deployment fail it does not give you error logs(cause of failure of deployment).  Is there any way we can get/generate error logs of deployment ?

 

Thanks in advance!!

Hi

 

I have tested and implemented Remote Action on visualforce page, It was working perfectly that time. But now I am shocked to see the same is failing with returning error message "Unable to connect to the server" . Does anyone else see this behaviour, please let me know.

 

I am trying to create an Idea object in test class as a customer portal user. but getting following error:

 

System.DmlException: Insert failed. First exception on row 0; first error: COMMUNITY_NOT_ACCESSIBLE, You do not have permission to access the community that this entity belongs to. You must be given permission to the community before you can access this entity.: [CommunityId]

 

I am using following apex code in test class:

 

 List<Community> listCommunity = [Select c.Name, c.IsActive, c.Id From Community c where IsActive=true and name=:TestClassUtility.PORTAL_COMMUNITY_NAME limit 1];
        
        System.runAs(portaluser){           
            Idea myIdea = new Idea(CommunityId = listCommunity.get(0).Id);
            myIdea.title = ' Test Idea';
            myIdea.body = ' test idea';
            insert myIdea;
            
            IdeaComment iComm = new IdeaComment(IdeaId = myIdea.Id);
            iComm.CommentBody = ' I like this idea';
            insert iComm;
       }

 

Thanks in advance for any help.

 

Ho can we associate(attach/detach) crm content  "ContentVersion" records to some custom object programatically?is there any method exposed to attach/detach in API?

I am working on  site pages .In an apex class I am creating a contact and then a portal user , Now immediately after that I need to get logged-in the recently created portal user on the site, Can anyone suggest , How can I get it ?

Hi to all.

 

I'm trying to build a loader for csv file. As you can see from the code I load my csv file in an attachment. After I take the body of the attachment and insert it into a string using the toString (). I noticed that when in the csv file there is the € symbol I get an exception of type 'BLOB is not a valid UTF-8 string'. Do you have any suggestion?

 

My Controller

public with sharing class DocumentwithEuroController {

	public Attachment document {
			get {
				if (document == null)
					document = new Attachment();
				return document;
			}
			set;
		}
		
		
	public PageReference checkFile() {
		
		
		String fileBody = '';
		
		try{
			fileBody = document.body.toString();
			system.debug(fileBody);
		}catch(exception e){
			if(e.getmessage() == 'BLOB is not a valid UTF-8 string'){
			
				ApexPages.addMessage(new ApexPages.message(ApexPages.severity.WARNING, 'In the csv file there are stressed symbols. The upload is blocked'));	
			
			}
		}
		
		
		
		return null;
	}	

	
	

}

 

My page.

 

<apex:page controller="DocumentwithEuroController" >
 
<apex:form >

<apex:pageMessages id="pms1" />

<label for="ifl"
						style="text-align: left; font-weight: bold; padding-right: 0.69em;">Selezionare
					il file tracciato(.csv):</label>
					<apex:inputFile id="ifl" value="{!document.body}"
						filename="{!document.name}" styleclass="btn" />
						<apex:commandButton value="Load csv" action="{!checkFile}"
				status="loadCsv" />

</apex:form>

</apex:page>

 

For me is very important, i must resolve this proble by tomorrow 


Tanks to all,

 

FP

I am getting error while running Tests 

 

  /**
      * Method that creates the test estimate object
      */
     public static Services_Estimate__c createTestEstimate(){
         Product2 prod = [SELECT ID, NAME FROM Product2 WHERE NAME = 'BASE24-eps'];
        
        Services_Demand_Management__c dm= new Services_Demand_Management__c (Name = 'MyTestEstimate',
                                  Request_Status__c = DemandManagementHelper.STATUS_NEW,
                                  Request_State__c = DemandManagementHelper.STATE_OPEN,
                                  Comments__c = 'My Desc',
                                  ACI_Product1__c = prod.Id,
                                  Request_Type__c = 'Services',
                                  Oracle_Project_Number__c = 'TP00001',
                                  Oracle_Project_Name__c = 'Test Project',                                  
                                  Request_Sub_Type__c = ServicesEstimateHelper.IAE_FULL,
                                  Request_Submitter__c = UserInfo.getUserId());
         insert dm;

         Services_Estimate__c est= new Services_Estimate__c(Name = 'MyTestEstimate',
                                        Estimate_Status__c = DemandManagementHelper.STATUS_NEW,
                                        Request_Description__c = 'My Desc',
                                        Demand_Management_Request__c = dm.Id);
                                        
         
         insert est;
         
         Services_Review_Meeting__c meeting = new Services_Review_Meeting__c(Estimate_In_Review__c = est.Id,
                                        Meeting_Date__c = Date.today(),
                                        Meeting_Description__c = 'Review IA',
                                        Meeting_Goal__c = 'Reach Agreement',
                                        AD_Comments__c = 'Done',
                                        AD_Review_Disposition__c = 'Agree',
                                        Product_Review_Disposition__c = 'Agree',
                                        Sales_Review_Disposition__c = 'Agree',
                                        Services_Review_Disposition__c = 'Agree');
         insert meeting;
         return est;
        
     }
     
     public static testMethod void testReadEstimate(){
         
         Services_Estimate__c est= createTestEstimate();                                   
         
         readEstimates(est.Demand_Management_Request__c);
         readEstimate(est.Id);
         readEstimateItems(est.Id);         
         readReviewMeetings(est.Id);
         readEstimateFunctionalFeatureMappings(est.Id);
      
     }


}

 Message shows that error occurs at Line 252 which is line below , but this query is returning a single result ,I am not sure why this error is appearing. Can some one pls. help me ? 

Product2 prod = [SELECT ID, NAME FROM Product2 WHERE NAME = 'BASE24-eps'];

Hi

I am getting the response has below when i send an http request .

am getting response has text data andin that url also .now i want to get the url from the response. only please can u help me

I am sendng an example of response

 

string response='the report has generated to sai and  and ready to access the data  ..etc.after this amgetting an url   http://www.abcadef.com/abc.asp?id=1  after these url am getting thanking you';

 

In these above response i want get only url from the response.please can u say me,

thanks in advance

 

 

  • December 21, 2012
  • Like
  • 0

From a best practice perspective, should the test class have any Try...Catch blocks or are all of these in the production classes and Triggers?

 

It seemed to me like the test class should not have Try...Catch blocks but I keep seeing these in examples.  Isn't purpose of these so the code catches them?

 

Thanks!

We have a quote template (a visual force page that renders as a PDF). This page currently uses the MessageFormat class from Java to format the currency fields on the quote. 

 

Here is the Visualforce example of how the Unit price on a product line item is formatted:

 

     <apex:column headerValue="Unit Price">

             <apex:outputText value="{0, number, $###,###,##0.00}">

                    <apex:param value="{!item.ListPrice}"/>

             </apex:outputText>

     </apex:column>

 

Note that <apex:outputText value="{0, number, $###,###,##0.00}"> gives back a USA currency format of $1,000.00. However, I need to have this be €###.###.##0,00 where the value comes out as €1.000,00. Note the position of the comma and period in the string.  It has been determined that the Java MessageFormat class will not work with other locations outside of the US. So I need another solution.

 

I have found some code in the Force.com Cookbook that will work to convert the decimal string into a Euro format:

 

     Decimal Amount = 199850010.28;
     Decimal dollars;
     Decimal cents;
     dollars = Amount.intValue();
     system.debug('Dollars is set to:' + dollars);
     cents = Amount - dollars;

     cents = cents.setScale(2);
     system.debug('cents is set to:' + cents);
     String AmtText = dollars.format()+','+ cents.toPlainString().substring(2) + ‘€’ ;
     System.debug(AmtText);

 

     199.850.010,28 €

 

 

I need help converting this code into a method inside of my Visualforce page controller. Also, I don’t know how link the output of this method to the appropriate line item values on the quote page.  It has been suggested by Salesforce Support that a wrapper class would do the dirty work. However, I have no experience with how to make a wrapper class work, nor how to use the above code within the wrapper class to format all of the currency fields (List Price, Discount Price, Discount Amount, Subtotal Amount, etc.) on our quote. 

 

Does anyone have a custom code example, or techniques for formatting currency in a Visualforce page so that Euros display properly?  I’m sure someone, somewhere has run into this requirement before since Salesforce is an international company.  Please share how you resolved this issue when using a Visualforce page template.

Hi,

 

How to use something like this..

 

<td >

          <apex:outputText value="{0, number, $###,###,###,##0.00}">
                    <apex:param value="{!IF(list.size>1,list[1].FieldValue,'$0.00')}"/>
          </apex:outputText>

</td>

 

Thanks

I wrote some code but unable to display in vf

 

vf:

-------------------------------------------

<apex:pageBlockTable value="{!get}" var="get_var" rendered="{!get_ren}">
             <apex:column value="{!get_var.name}"/>
            
            </apex:pageBlockTable>

 

class:

-------------------------------------------

list<SObject> selrec= new list<SObject>();

 accrec=[select id,name,check__c from account limit 10];

 conrec=[select id,lastname,check__c from contact limit 10];

 public PageReference Addtoselectedlist() {
       get_ren=true;
       for(account a:accrec){
         if(a.check__c==true){
         selrec.add(a);
         }
       }
       for(contact c:conrec){
         if(c.check__c==true){
         selrec.add(c);
         }
        
    }
 
return null;
}
     public sobject[] getGet() {
        return selrec;
    }

the goal:

Collect website visitors contact information (first name, email)  and store it in force.com custom object (consumers).

 

There are multiple different websites and the visitors contact information would have to be associated with the website they were visiting and submitting the form from.

 

Is there a declaritive way to do this on Force.com or is this only accomplished through code?

 

Thanks

 

Chris

 

 

 

 

interview Question:What  is Version controller and what version controler we used in Salesforce?

Hello everyone,

 

I have created a JavaScript button which is creating a curious effect. Upon clicking the button, it should create a task alerting another user that a lead is ready for their review. The fields should auto populate with the other users Name and Lead info through the use of a URL hack.

 

Instead, when the task is created, it notifies the creator of the task and attaches to a Contact of the same name as the lead. I find that if I click the magnifying glass next to the Assigned to User Field and the Name Lead field it works correctly. Any idea what might cause this or how to correct it?

 

Below is the button code. Thank you for your help,

 

if ({!Lead.Description} == "ceuenrollment") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=CEU%20Order";
}

else if ({!Lead.Description} == "certrenew") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Cert%20Renewal";
}

else if ({!Lead.Description} == "certreplace") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Replacement%20Display%20Certificate%20Request";
}

else {
alert("This lead can not be marked as paid.");
}

 

Hi all,

 

I'm trying to build a custom button on a page layout for a custom object  that calls javascript that updates other fields on the page.  I defined the behavior as "execute javascript" and the Content Behavior as "OnClick Javascript".  The source is simple;

 

<script language="JavaScript">
try { {!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} {!Appointment__c.Confirmed_Date__c}={!Appointment__c.ApptDate__c} ; {!Appointment__c.Confirmed_Time__c}={!Appointment__c.ApptTime__c} ; } catch(err){ alert(err); }
</script>

 

...But I keep on getting a popup that says "syntax error"  - help?

 

 

 

Hi,

    i am doing standered salesforce functionality of Merge ,that time can i find any call in controller or trigger ? if it is posible ple tell me

 

thanks&regards.

Bondi

Hi,

 

is there a way to authenticate an application for using the salesforce rest api with just the normal username / password credentials from

the basic http authentication?

I know thats not safe but its just for testing the functionality of my application.

 

best regards

Elmar

  • June 27, 2012
  • Like
  • 0

Hi,

 

I have a wrapper list which contains an integer value, a product record and a boolean value. 

my requirement is to sort that list according to the product name..

 

please help...its urgent.

 

 

 

 

 

Thanks in advanced

  • May 19, 2012
  • Like
  • 0

Hi,

We are planning to implement custom interface to open incident for our client. For that we are going to follow claim based authentication.

 

So I want to know is sales force support claim based authentication .

 

Thanks,

Pramod

Hi all anyone see what stupid mistake im making here?

 

Ive got a map:

 

map<string, Consultant__c> ConsultantMap = new map<string, Consultant__c>([select name, id from Consultant__c]); //this seems to work fine.


and all i want to do is use the value from a pick list as the key, so if i select 'Darth Vader' it uses that as the key and gets me the id.

 

now i've tried:

 

UsersId = ConsultantMap.get(pa.Login_As__c).id;

 

and even

 

Consultant__c X = ConsultantMap.get('Darth Vader');

system.debug('X' + X.Id);

 

but every time it fails and the id is null. yet the map is populated ok. I dont get what im going wrong.

 

Thanks All


Hi We have an tricky situation my all the apex class are covered more then 85% except one class use an StandardSetController Class  .Here is my sample code how i can cover the code. Somebody can help me to cover the line in test coverage.

List<Custom Object> variable1 = (List<Custom Object>)xyz.getSelected(); I am getting the p_stdSetController from my constructor here is the code ApexPages.StandardSetController xyz. List<Custom Object> variable1 = (List<Custom Object>)xyz.getSelected(); this line is hitting the code coverage .

 

 

  • May 26, 2009
  • Like
  • 0
Hi,
I'm new to Apex development. 
I used the "Generate From WSDL" option to create an Apex class to access our WebService.
The WebService is fairly large, the generated class came in just under the limit at 95k characters.
When I went to deploy this class from my Sandbox to our production environment (using Apache Ant),
I received an error saying 0% of my class was covered by Unit Tests.
Now, I wrote a test, but it gave a warning saying:
"Testmethods do not support webservice callouts".
So essentially Unit Tests for this class are just fillers to get past the 75% restriction.
At 95k characters, I'm looking at a lot of empty Unit Tests to get this code deployed on our production environment.
Is there currently any way to deploy an auto-generated apex class w/o writing Unit Tests?
Thanks in advance.