• magalie pickert
  • NEWBIE
  • 0 Points
  • Member since 2008

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

I have a problem egarding Test Methods.
I'm becoming this error: No testMethods found in the selected Apex code for the package
And it is regarding my bevor insert trigger
Trigger BeforInsertObj on Obj__c (before insert)
And my code contains an insert statment:
Code:
public static testMethod void test()
{
try{

User user = new User();
Obj.Editor__c = user.Id;


System.debug('Add a Obj\n');
insert Obj;

Obj.Priority__c= 'Low';
Obj.Schedule_Time__c = Date.valueof('2008-12-01');
update Obj;

InsertTask(Obj);


}
catch (DmlException e) {
   System.debug(e.getMessage());
   }
   
}

 

Do you have any Idea?

Thx

Magda






Hi,

i want to create a query in my apex class...

I become this failure: Invalid type: sforce.QueryResult

If i try to add import i become also a failure:
Invalid type: sforce.QueryResult

How can i add in my code that i'm using salesforce apex librairie?

Thx
Hi,

I try to do a bulkifly trigger...
And I'm becoming a non understandable failure. I hope you can help me....

Code:
 Error: Kompilierungsfehler: Loop condition must be of type Boolean: Integer in Zeile 12 Spalte 19

 
My Code is:

Code:
trigger InitialContactSolution on Obj__c (after insert) {


// create list
Obj__c[] ObjToUpdate = new Obj__c[0];

// perform looping action
for (Obj__c cl : Trigger.new) {
     ObjToUpdate.add(cl); 
}
if (!ObjToUpdate.isEmpty()) {
for (Integer i=0; ObjToUpdate.size(); i++){
   newGatheringController.InsertTask(ObjToUpdate[i]);
   }
}
}

 Thx


Hi,

i want to create an about tab for my customer object. But I don't find how.

What I find is:
About tab
Most apps are installed by an administrator. Therefore, most users will not be aware of the app until it is deployed. After deployment, an About tab is very useful to users and should give them an introduction to the entire app.
An About tab is a custom tab included with an app on the AppExchange. It provides users with:
  • Description of the app
  • Training and support information
Providing users with training options is the best way to ensure customer adoption of your app. Similar to the way that salesforce.com provides free training, you should provide user training for commercial applications either through webinars or recorded presentations. Include a section in your About tab that covers how to get training on the app.
But i don't find how to realise this one.

Could you please help me?

Thx

Magalie

Hi,

i'm writing a new application.
I need:
- fixe pick list values ( special applicationsuser cannot chagne the values)
- flexible pick list values (special applicationsuser can change the values)
for my package.

I search during my package creation to do that, but I don't find a solution.
Do you know what can I do?


Thx

Magalie
Hi,

I have a problem egarding Test Methods.
I'm becoming this error: No testMethods found in the selected Apex code for the package
And it is regarding my bevor insert trigger
Trigger BeforInsertObj on Obj__c (before insert)
And my code contains an insert statment:
Code:
public static testMethod void test()
{
try{

User user = new User();
Obj.Editor__c = user.Id;


System.debug('Add a Obj\n');
insert Obj;

Obj.Priority__c= 'Low';
Obj.Schedule_Time__c = Date.valueof('2008-12-01');
update Obj;

InsertTask(Obj);


}
catch (DmlException e) {
   System.debug(e.getMessage());
   }
   
}

 

Do you have any Idea?

Thx

Magda






Hi,

i want to create a query in my apex class...

I become this failure: Invalid type: sforce.QueryResult

If i try to add import i become also a failure:
Invalid type: sforce.QueryResult

How can i add in my code that i'm using salesforce apex librairie?

Thx
Hi,

I try to do a bulkifly trigger...
And I'm becoming a non understandable failure. I hope you can help me....

Code:
 Error: Kompilierungsfehler: Loop condition must be of type Boolean: Integer in Zeile 12 Spalte 19

 
My Code is:

Code:
trigger InitialContactSolution on Obj__c (after insert) {


// create list
Obj__c[] ObjToUpdate = new Obj__c[0];

// perform looping action
for (Obj__c cl : Trigger.new) {
     ObjToUpdate.add(cl); 
}
if (!ObjToUpdate.isEmpty()) {
for (Integer i=0; ObjToUpdate.size(); i++){
   newGatheringController.InsertTask(ObjToUpdate[i]);
   }
}
}

 Thx


Hi,

i want to create an about tab for my customer object. But I don't find how.

What I find is:
About tab
Most apps are installed by an administrator. Therefore, most users will not be aware of the app until it is deployed. After deployment, an About tab is very useful to users and should give them an introduction to the entire app.
An About tab is a custom tab included with an app on the AppExchange. It provides users with:
  • Description of the app
  • Training and support information
Providing users with training options is the best way to ensure customer adoption of your app. Similar to the way that salesforce.com provides free training, you should provide user training for commercial applications either through webinars or recorded presentations. Include a section in your About tab that covers how to get training on the app.
But i don't find how to realise this one.

Could you please help me?

Thx

Magalie

I recently installed Eclipse 3.3.1.1 for Java Developers and I installed the Force.com Apex plug-in, as well. I started a new Force.com project and added a new Apex Class, though I added this class under the default "unpackaged" category (so in the package explorer pane it appears under <project name>/src/unpackaged/classes/<class name>.cls). If I right click > Force.com > Run Tests, a dialog appears saying "Operation in progress..." (which closes immediately), and then the "Apex Code Test Runner" pane pops up, but no information appears within the pane indicating any sort of test was run. When I set the "Logging Level" to "Profiling (maximum verbosity)", I see several messages indicating there is no profiling information for SOQL, DML, and method invocations. It's as if the interface runs, but it executes no real analysis.

When I attempt to synchronize, save to the server, or apply the project to the server, the same thing occurs. An "Operating in progress..." dialog pops up, then nothing else occurs indicating anything has happened.

Here's the class I'm attempting to run tests on:
Code:
global class XmlEmailUtil {
 public static String AddXmlTagPair(String name, String value) {
  if (name == null) { return ''; }
  
  return 
   '   <tag_pair>\n' +
   '    <name>' + name + '</name>\n' +
   '    <values>\n' +
   '     <value>' + value + '</value>\n' +
   '    </values>\n' +
   '   </tag_pair>\n';
 }
 
 public static void SendXmlEmail(String id, String body, String toAddress) {
  Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
  
  email.setToAddresses(new String[] { toAddress });
  email.setSubject(id);
  email.setPlainTextBody(body);
  
  Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email });
 }
 
 static testMethod void TestAddXmlTagPair() {
  AddXmlTagPair(null, null);
  AddXmlTagPair(null, 'value');
  AddXmlTagPair('name', null);
  AddXmlTagPair('name', 'value');
 }
 
 static testMethod void TestSendXmlEmail() {
  SendXmlEmail(null, null, null);
  SendXmlEmail(null, null, 'cgarrett@p4healthcare.com');
  SendXmlEmail(null, 'body', null);
  SendXmlEmail(null, 'body', 'cgarrett@p4healthcare.com');
  SendXmlEmail('id', null, null);
  SendXmlEmail('id', null, 'cgarrett@p4healthcare.com');
  SendXmlEmail('id', 'body', null);
  SendXmlEmail('id', 'body', 'cgarrett@p4healthcare.com');
 }
}

 

  • February 12, 2008
  • Like
  • 0
Hi All
 
I have written a S-control to update a field.
 
The Problem is 'it is not working for few profiles'. What might be the reason.
 
Can anyone help in this.
 
Thanks in Advance
Anand