• MikeD13
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 11
    Replies
I am in the process of setting up an Email Service to handle Email2Case. The service works when creating a new case, however, I'm having problems when trying to update existing cases.

I have a few questions:
1) Is there a standard format for the ThreadID. Example -  ref:[8 Characters].[8 Characters]:ref
2) How do I find a case by the thread ID? The thread ID appears to be a truncated version of the organization and case ID's but this seems odd to me. If it is, what is the formula for truncting the ID's (first 4 plus last 4 is what it looks like).

Thanks,
Mike
I created a trigger and class in by Sandbox and deployed them to production. Now, I would like to drop the class and trigger in production but I cannot do so. I have attempted using the Apex and Force.com toolkits. The best I have been able to do is comment out the code so they do nothing and then redeploy.

Here's the message from the Apex Toolkit log:
DEBUG [2008-01-22 09:50:38,490 {HH:mm:ss}] (ApexArtifactService.java:compileTestSave:330) - Delete [1] Apex Triggers
 INFO [2008-01-22 09:50:39,787 {HH:mm:ss}] (ApexArtifactService.java:compileTestSave:343) - Compile/save/delete problem was [Test coverage of selected Apex Class and Trigger is 0%, at least 75% test coverage is required]
DEBUG [2008-01-22 09:50:39,787 {HH:mm:ss}] (Markers.java:addWarningMarker:143) - Add warning marker to 'Shea Production'
DEBUG [2008-01-22 09:50:39,818 {HH:mm:ss}] (SalesforceToolkitOnlineBuilder.java:handleDeleteResult:308) - Successful delete of ApexTrigger 'null'
DEBUG [2008-01-22 09:50:39,818 {HH:mm:ss}] (SalesforceToolkitOnlineBuilder.java:handleLocalDeletes:392) - Locally delete file 'trgRentStepChange.tgr'

And from the Force.com log (Not showing full stack track for error... let me know if you need it):

ERROR [2008-01-22 09:39:09,325 {HH:mm:ss}] (RefactorService.java:performRemoteDelete:664) - Unable to perform server delete
com.salesforce.toolkit.remote.ToolkitConnectionException: java.lang.RuntimeException: Failed deployment: UNKNOWN_EXCEPTION msg:null: Cannot complete this operation. Cannot delete classes/triggers in production.  Use compileAndTest verb to delete. : null

Thanks,
Mike
Ok, I've read a dozen threads and all the documentation I can find but still can't seem to get the gist of how to save objects to Salesforce. I etiher end up receiving insufficient coverage messages or the items just don't seem to save anyway. Somehow, I managed to save a trigger and its test class to Salesforce yesterday. Today, I tried adding another class and trigger but the coverage errors were blocking me. The new class kept validating against the old trigger and not the new one. I then deleted all my objects to get a fresh start (I saved the code in local text files first). Now, when I try to save items, they don't get saved in Salesforce but there is no "only saved locally" message.

Can someone please give me a step-by-step list of how I go about creating Apex Triggers/Classes and saving them to SF through Eclipse? In my scenario, I am trying to create two triggers (on different objects). One of the triggers will be calling a method from another class.

I'm using Eclipse 3.3.1.1 and the Apex Toolkit 8.1.0.200710161138 (not using Force.com due to rollbackOnError issue). Also, I am using the Enterprise Edition of Salesforce.

UPDATE: I have finally gotten both triggers onto Salesforce. I had to use a single class for all my methods. Within this class, I created a single testMethod that runs tests against all objects.  My new issue is getting updates saved. When I modify my code and save it, it does not seem to get pushed out to Salesforce. Any thoughts?


Message Edited by MikeD13 on 01-16-2008 02:08 PM
Each of my accounts will have a PDF document associated with it. I would like to create a custom link on the account detail screen to point to this document. The title of the document will be unique based on the external ID I supply.

Unfortunately, it looks like the document link uses the ID instead of the title I assign:
https://na5.salesforce.com/servlet/servlet.FileDownload?file=01570000000dfqf

How can I create a link that will determine the correct ID and open the document?
I am in the process of setting up an Email Service to handle Email2Case. The service works when creating a new case, however, I'm having problems when trying to update existing cases.

I have a few questions:
1) Is there a standard format for the ThreadID. Example -  ref:[8 Characters].[8 Characters]:ref
2) How do I find a case by the thread ID? The thread ID appears to be a truncated version of the organization and case ID's but this seems odd to me. If it is, what is the formula for truncting the ID's (first 4 plus last 4 is what it looks like).

Thanks,
Mike
I did a trigger on enterprise version sf with eclipse. which can't edit trigger on sfdc.
I can upload this trigger from eclipse to sfdc. but I can't upload the active config. I config the trigger.xml to <active>true<active> and upload it. but it doesn't work. In server the trigger is still deactive.
How can I active the trigger?
  • March 18, 2008
  • Like
  • 0
Ok, I've read a dozen threads and all the documentation I can find but still can't seem to get the gist of how to save objects to Salesforce. I etiher end up receiving insufficient coverage messages or the items just don't seem to save anyway. Somehow, I managed to save a trigger and its test class to Salesforce yesterday. Today, I tried adding another class and trigger but the coverage errors were blocking me. The new class kept validating against the old trigger and not the new one. I then deleted all my objects to get a fresh start (I saved the code in local text files first). Now, when I try to save items, they don't get saved in Salesforce but there is no "only saved locally" message.

Can someone please give me a step-by-step list of how I go about creating Apex Triggers/Classes and saving them to SF through Eclipse? In my scenario, I am trying to create two triggers (on different objects). One of the triggers will be calling a method from another class.

I'm using Eclipse 3.3.1.1 and the Apex Toolkit 8.1.0.200710161138 (not using Force.com due to rollbackOnError issue). Also, I am using the Enterprise Edition of Salesforce.

UPDATE: I have finally gotten both triggers onto Salesforce. I had to use a single class for all my methods. Within this class, I created a single testMethod that runs tests against all objects.  My new issue is getting updates saved. When I modify my code and save it, it does not seem to get pushed out to Salesforce. Any thoughts?


Message Edited by MikeD13 on 01-16-2008 02:08 PM
I am a new Apex user and i write this code :

 

trigger opp_line_item_update on Opportunity (after update) {

for (opportunitylineitem[ ] olis : [Select z_oli_update__c From opportunitylineitem oli  where opportunityid in : trigger.new ]){

if (olis.z_oli_update__c!='world')
olis.z_oli_update__c='world';

}
}

Error: Compile Error: Initial term of field expression must be a concrete SObject: LIST:SOBJECT:OpportunityLineItem at line 4 column 1

What is the ptroblem with my  SObject ?




  • January 16, 2008
  • Like
  • 0
Each of my accounts will have a PDF document associated with it. I would like to create a custom link on the account detail screen to point to this document. The title of the document will be unique based on the external ID I supply.

Unfortunately, it looks like the document link uses the ID instead of the title I assign:
https://na5.salesforce.com/servlet/servlet.FileDownload?file=01570000000dfqf

How can I create a link that will determine the correct ID and open the document?