• ahbo
  • NEWBIE
  • 0 Points
  • Member since 2009

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

Hi ALL,

 

I've a Apex Webservice  Class as below

 

global class getQuotationNumber {

        WebService static String QuoteNumber(String id) {

                 // My Codes Here

        }

}

 

and I've use the following code in my VF page to call the functions....

 It works well so far........however, after I add a namespace to my package........

I cannot callout the functions

 

Can Anyone answer my question.

The following is my code in the VF page

 

<script type="text/javascript" src="/js/functions.js"></script>
 <script src="/soap/ajax/11.1/connection.js"></script>
 <script src="/soap/ajax/10.0/apex.js"></script>

 

<script>
      window.onload = function() {
          sforce.connection.sessionId = '{!$Api.Session_ID}';         
          var id = '{!$CurrentPage.parameters.id}';

          try {
              var complete = sforce.apex.execute('getQuotationNumber', 'QuoteNumber', {id:id});
          }
          catch (e) {
              alert(e.Name + ", " + e.Message);
          }
          alert(complete);         
      }
  </script>

  • April 20, 2009
  • Like
  • 0
hi all, i have a class named package_controller and i would write a test method for it. can anyone tell me how to write this coz i have no idea at all.... 
public class Package_Controller {

private final Quotation__c quote;
private final Product2[] prod;

List<String> itemName = new String[0];
List<String> prod_id = new String[0];

public Package_Controller(ApexPages.StandardController stdController) {
this.quote = (Quotation__c)stdController.getRecord();

String sql_prod = 'SELECT id, name FROM Product2 WHERE IsActive = TRUE AND Family != NULL';
this.prod = Database.Query(sql_prod);
}

public String getPackage() {
String output = '';
Integer i, j;
String pay_list = '';
String con_list = '';

My Code Here.......

return output;
}

public PageReference toQuoteDetail() {

PageReference detailPage = new PageReference('/apex/GenQuoteDetail?id=' + quote.id);
detailPage.setRedirect(true);
return detailPage;
}
}
  • April 15, 2009
  • Like
  • 0

Hi ALL

 

I've just created a TEST managed package in AppExchange and waiting to review.

Is it possible to install it at my Professional Edition now ?

 

 

By the way, the TEST managed package compose of a simple Apex Class and VF Pages.

Is that possible to run Apex Classes in Professional Edition which do not enable to ApexClasses.

 

 

 

Thanks.

  • April 08, 2009
  • Like
  • 0

I have a field that is long text area which i want it to be multiline and formatted like HTML <ol> and <ul>

 

 

i have a problem in visualforce page, when I retrieve the field,

i cannot just get a serious of text instead of formatted one.

 

please help, I've been struggle for a whole day and get no progress.

  • March 10, 2009
  • Like
  • 0

Hi ALL...

 

I can use a child object to access the records in the parent object..

 

 

However, I would like to know how i can access child object's records with a visualforce page

which used the parent object as the standard controller ?

 

 

 

How I should define the field or write the code.

 

 

Much thanks again...

 

  • March 10, 2009
  • Like
  • 0

Hi ALL

 

I've created a custom object call Quotation and I would like to create a visual force page

in Quotation Tab that will access information in Account, Contacts and other customer object as well

 

I have a field in Quotation call Account_Name which is reference to the name of the account....

 

I don't know why I cannot call the field with the following code, please help !!!

 

<apex:smileytongue:age standardController="Quotation__c">

  {!Quotation__c.Account.Name}

</apex:smileytongue:age>

 

This is the error message I can see...

Error : Invalid field Account for SObject Quotation__c

  • March 09, 2009
  • Like
  • 0

Hi ALL

 

I've created a custom object call Quotation and I would like to create a visual force page

in Quotation Tab that will access information from Account, Contacts etc...

 

I have a field in Quotation call Account_Name which is reference to the name of the account....

 

I don't know why I cannot call the field with the following code, please help !!!

 

<apex:page standardController="Quotation__c">

  {!Quotation__c.Account.Name}

</apex:page>

 

This is the error message I can see...

Error : Invalid field Account for SObject Quotation__c

  • March 09, 2009
  • Like
  • 0
hi all, i have a class named package_controller and i would write a test method for it. can anyone tell me how to write this coz i have no idea at all.... 
public class Package_Controller {

private final Quotation__c quote;
private final Product2[] prod;

List<String> itemName = new String[0];
List<String> prod_id = new String[0];

public Package_Controller(ApexPages.StandardController stdController) {
this.quote = (Quotation__c)stdController.getRecord();

String sql_prod = 'SELECT id, name FROM Product2 WHERE IsActive = TRUE AND Family != NULL';
this.prod = Database.Query(sql_prod);
}

public String getPackage() {
String output = '';
Integer i, j;
String pay_list = '';
String con_list = '';

My Code Here.......

return output;
}

public PageReference toQuoteDetail() {

PageReference detailPage = new PageReference('/apex/GenQuoteDetail?id=' + quote.id);
detailPage.setRedirect(true);
return detailPage;
}
}
  • April 15, 2009
  • Like
  • 0

Hi ALL

 

I've just created a TEST managed package in AppExchange and waiting to review.

Is it possible to install it at my Professional Edition now ?

 

 

By the way, the TEST managed package compose of a simple Apex Class and VF Pages.

Is that possible to run Apex Classes in Professional Edition which do not enable to ApexClasses.

 

 

 

Thanks.

  • April 08, 2009
  • Like
  • 0

Hi ALL...

 

I can use a child object to access the records in the parent object..

 

 

However, I would like to know how i can access child object's records with a visualforce page

which used the parent object as the standard controller ?

 

 

 

How I should define the field or write the code.

 

 

Much thanks again...

 

  • March 10, 2009
  • Like
  • 0

Hi ALL

 

I've created a custom object call Quotation and I would like to create a visual force page

in Quotation Tab that will access information in Account, Contacts and other customer object as well

 

I have a field in Quotation call Account_Name which is reference to the name of the account....

 

I don't know why I cannot call the field with the following code, please help !!!

 

<apex:smileytongue:age standardController="Quotation__c">

  {!Quotation__c.Account.Name}

</apex:smileytongue:age>

 

This is the error message I can see...

Error : Invalid field Account for SObject Quotation__c

  • March 09, 2009
  • Like
  • 0