• Kenji776
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 33
    Replies
Okay, Salesforce has really been getting on my nerves lately.
I have run across, yet another strange bug. Apperantly the subject of a case in considered a pick list?! It is not, it is a text field. Look at this picture of a workflow rule I have been trying to create. The premise is simple, if the subject contains the word spam (our mail server marks anything it thinks is spam this way) then change the status to junk. Why can't I do this?

Hello all,
I have been asked to create a feature, where on an account there are 2 check boxes, one called "Lost Client Tasks" and one called "New Client Tasks", along with two new workflow rules. Each rule corresponds to a box, and creates several tasks. The problem is, I need who those tasks are assigned to to be selectable. Right now it seems you can only hard code in a user, or role which to assign the tasks to. I wanted to have a user lookup box called "Assign Tasks To" where it could pull the name of the person you want to assign the tasks to from. I hope this makes sense, and I really hope there is a way to do it. I tried using the assign to record owner, and having the workflow rule change the owner of the account to the name in the "Assign Tasks To" field, but using a field uipdate you cannot change the Record Owner to the value of another field, only a static value. Anybody have any ideas?
Hello all,
I have been asked to do some work on the Task page, and have a few questions.

1) Can I remove the "Schedule a follow up task" section. We don't use it, and it's clogging up my screen.

2) They would like to add a trigger of some kind that automatically fills in the comments field with some pre defined text if a certain option is selected from the type field. What is the easiest way to do this?

Let me know. Thanks!
I know this is not the right area, but I could not for the life of me where to file a bug report. Here is the deal,
The new version of internet explorer seems to cause problems in the Console View. IE Version 7.0.6001.18000 received the error

Line: 120
Char 5
Error: 'Desktop' is undefined
Code: 0
URL: https://na2.salesforce.com/ui/desktop/desktoppage

Our console works on other versions of IE, but the one above causes the error listed. Any ideas, or just wait for Salesforce to fix, or do I have something configured wrong?


Message Edited by Kenji776 on 06-25-2008 09:17 AM
Hey all,
I got a  new request today that I think should be possible, but I can't think of a good way to do it. Here is the request:

"Can we make it so that when you send the first email from a case that was not created by an email, it pulls the description into the body, and the case subject into the Email Subject?"

Basically it just needs to look at the case origin. If the origin was not email, make the email grab the subject from the case subject line and the body from the case description area. Any idea if this is something that can be done?
Hello all,
This is probably not quite the right area for this question, but I could not find a better spot, so admins feel free to move it, I won't be offended :P Anyway, my users have requested a few features, which despite my trying I haven't through of a good way to do.

1) Case age incremental counter. Basically, every day a case is not closed, they want the age to increment by one. The catch is, if a case goes to closed, then reopens, they want the counter to zero out, and restart. So a regular formula that calculates based on createdate, and closed date, or now() won't help. Perhaps a C# app that logins in once a night and increments all open cases by one day? Is there a better way. I wanted to use workflow rules, but the timed triggers only occure once if I understand them correctly, so this wouldn't work. Anyone have any good ideas?

2) Ability to automatically change case status on the send an email page. They state that it is a bit of a hassle to go change the case status after they send an email. Once we send an email we always change the case status to "waiting for customer". Again perhaps a workflow rule would work here, but not totally sure how I would impliment it. As a side note, can you customize the send an email page at all? I was unable to find an area you were could customize that page at all. It seems to be classified as a Task, but nowhere did I see a page layout, or set of record types that specify it as an email page.

3) Autopopulate a field. For some reason they would like a case that is created for an accout to automatically pull some info from the account for easy rerfence. For instance, the account keeps track of what software an account uses. They would like that same information on the case as well. I don't really care if you can do this or not, but I would at least like to provide proof that it can't be done, or would be a ton of work.

Anyway, let me know what you think about the above questions. Let me know if I can provide more info of be of more help.
Hey everyone,
I have been reading for hours, and I still don't feel like I understand any better how salesforce, and asp.net, and the wsdl and everything play together. I want to write a very simple page, in this case a page that receives a url variable name, takes that and queries salesforce to see if there is a contact in the contacts table by the same name. How would I do this? I was able to write a stand alone exectuable in C# that did this easily, but turning it into a website is just beyond my understand. Please help. Thank you.
Hey All,
I finished writting my trigger that helps grab info from the web to case form and fill in the case fields as needed, and create/update contacts as needed, but I'm stuck at 62% code coverage and I don't know why. It's only one function, and the test code im providing should get it inside the if statment(s). Any ideas?

Code:
public class WebtoCaseWorkflow 
{
 //This Class will take the information passed in by the web to case form, and basically copy it into
 //the proper fields on the case. Also, it will update contact information if the contact already exists,
 //or create a contact if they do not. 
 
 //Information expected to be passed: Web_First_Name__c, Web_Last_Name__c, SuppliedEmail, SuppliedPhone, CID__c
 //along with the regular case information, eg. subject and description.
 
 //This trigger should not run if the source is Phone, or Email, only if the case is coming from the web.

 public static void QueryAndUpdateCase(Case[] caseitem)
 {
  string AccountIsValid = 'undefined';
  //With the CID passed from the web form, let's try to find the matching account in SF
  for (Case c:caseitem)
  {
   //Make sure this case is coming from the web form before doing anything else.
   if(c.Origin == 'Web')
   {
    //Search for any accounts with the same CID as the one passed in.
             Account[] AccountResult = [SELECT CID__c, Name, Id FROM Account WHERE CID__c = :c.CID__c];
    
      //If we find a match on the CID (which we should, every time)
      //Set the account info for this case.
      
         if(AccountResult.size() > 0)
      {  
     c.AccountId = AccountResult[0].Id;
     AccountIsValid = 'yes';
      }
      
      if(AccountResult.size() < 0)
      {  
     // some kind of error handling should go here. Without a proper account
     // linking we won't be able to add a contact.
     AccountIsValid = 'no';
      }
  
    //Now with the account linked up, let's deal with the contact portion.
 
    //Query for a contact with the same email as the one provided, since email has to be unique.
             Contact[] ContactResult = [SELECT Name, Id, Phone, FirstName, LastName FROM Contact WHERE email = :c.SuppliedEmail];
    
     
     //----------------------------------Found a Contact Match----------------------------------// 
         if(ContactResult.size() > 0)
      {  
       
       //Update the contact record with the information they give us, 
       //since they are giving us updated info, might as well use it.
       for (Contact q:ContactResult)
       {
      q.Phone = c.SuppliedPhone;
      q.FirstName = c.Web_First_Name__c;
      q.LastName = c.Web_Last_Name__c;
     }
     
     //Set the ID of the contact as the one retreived from the query. With just the ID
     //Salesforce can query the contact record and fetch the name, phone number, and email.
     c.ContactId = ContactResult[0].Id;
      }
      
      //--------------------------------Did not find a Contact Match-------------------------//
      if(ContactResult.size() < 1)
      {
       //If the CID they gave was valid, and can be hooked to an account, link the contact
       //to that account as well.
       if(AccountIsValid == 'yes')
       {
        //If the contact does not exist, let's make it using the info provided from the form.
        Contact ContactMake = new Contact(FirstName=c.Web_First_Name__c, LastName=c.Web_Last_Name__c, Email=c.SuppliedEmail, Phone=c.SuppliedPhone, AccountId=AccountResult[0].Id); insert ContactMake;
         CONTACT[] getContactId = [SELECT Id FROM Contact WHERE Email = :c.SuppliedEmail];
         c.ContactId = getContactId[0].Id;
       }
       
       //If the CID they gave us was not valid, and did match to an account, create the contact,
       //but don't attempt to link it to an account since we don't know what account they belong to!
       if(AccountIsValid == 'no')
       {
        //If the contact does not exist, let's make it using the info provided from the form.
        Contact ContactMake = new Contact(FirstName=c.Web_First_Name__c, LastName=c.Web_Last_Name__c, Email=c.SuppliedEmail, Phone=c.SuppliedPhone); insert ContactMake;
         CONTACT[] getContactId = [SELECT Id FROM Contact WHERE Email = :c.SuppliedEmail];
         c.ContactId = getContactId[0].Id;
       }
        
      }
      
      //Okay I think we are done. We have now update the case with both account and contact information
      //that we received from the web form. Hopefully it didn't blow up and die.
   } 
  }
 }
 
 public static testMethod void QueryAndUpdateCaseTest()
 {
   //Create an account and retreive account #
   Account AccountMake = new Account(Name='test123'); insert AccountMake; 
   ACCOUNT[] getAccountId = [SELECT Id FROM Account WHERE name = 'test123'];
   
   //Create a contact that belongs to the account we just made, and retreive the ID
   Contact ContactMake = new Contact(LastName='testJohnson', FirstName='test', Email='frank@frank.com', AccountId=getAccountId[0].Id); insert ContactMake;
   CONTACT[] getContactId = [SELECT Id, FirstName, LastName FROM Contact WHERE LastName = 'testJohnson'];
   
   //Create a case that belongs to the contact we just made, then fetch it's ID.
   Case CaseMake = new Case(ContactId=getContactId[0].Id, Status='open', Problem__c='Other', Origin='Web', Subject='testcase21313213', description='test case of joy', PETE_ID__c='ADY2342342', SuppliedPhone='(345)-352-6244', SuppliedEmail='frank@frank.com', CID__c='141231', SuppliedName='Frank Johnson', SuppliedCompany='test123' ); insert CaseMake;
   CASE[] getCaseId = [SELECT Id, Origin, SuppliedPhone, SuppliedEmail, CID__c, Web_First_Name__c, Web_Last_Name__c, SuppliedCompany  FROM Case WHERE Subject = 'testcase21313213'];

   //Call the main script that autofills those boxes, and pass the array returned from the above query.
    WebtoCaseWorkflow.QueryAndUpdateCase(getCaseId);

 }
}

 

Hello all.
We have an autonumber field called CID__c, sometimes we need to modify one of them. So I need a way to change the field type from autonumber to text so it is editable, then change it back to autonumber. Can you change a field type through the API?
Also, what would the query look like to select the largest CID out of Account object and assign it to a variable, so when I have to change it back to autonumber I have a number for it to start counting at. Thanks!
Hello all,
I just wrote my first Apex trigger, and deployed it to production. Now I need to make a change to it, but I cannot seem to convince eclipes that overwritting is a valid action. I changed my trigger, saved it, selected the class and the trigger from the list of things to update, and it keeps telling me "Please select at least one component to be deployed".





Can somebody please help, I desperatly need to disable one part of my trigger, or the whole thing, but I can't modify it at all! HELP!
Hey everyone,
I just wrote my first apex script today, all it does is autofill some boxes based on information it can pull based on the case number. I am extremely confused, and to be honest, quite angry with this whole testing, code coverage thing. It doesn't make any sense to me at all, I don't need freaking big brother forcing me to error check my code, I'd rather deal with errors than have to put up with this crap. Anyway, I am wondering how I would write the required code to make this test and be able to be deployed.

public class AutoFillPete
{
public static void PETEFILL(PETE_Items__c[] pete)
{
for (PETE_Items__c p:pete)
{
CASE[] contactResult = [SELECT ContactId,AccountId FROM CASE WHERE id = :p.Case__c];
ACCOUNT[] accountResult = [SELECT CID__c FROM ACCOUNT WHERE id = :contactResult[0].AccountId];

if(contactResult.size() > 0)
{
p.Contact__c = contactResult[0].ContactId;
p.Account__c = contactResult[0].AccountId;
p.CID__c = accountResult[0].CID__c;
}
}
}
}

Can someone help me write the code that will be needed to make this deployable (I am still working on sifting through the 14 different guides that are needed to deploy an app to production, I have no idea what I'm doing on that either, something about ant, and such).
Hello all,
Me again with another project. To try and make the case process easier, we want to be able to have a button that copies the text from the SolutionNote field in the attached solution, and copy it into the resolution field of the case, then close it. The problem is that I cannot find how to link Case->Case Solution->Solutions. The Case Solution is what gets linked to the case in the attached solution, and that does not contain the SolutionNote field that contains the text I need. So I basically need to write two queries, one to find the ID of the solution is the Case Solution table, then another to grab the SolutionNote from the Solutions table. The problem is that half the fields don't seem to be queryable, like I'll go to grab "CaseSolutions" from the Solution table, and it will say invalid column name.

<element name="CaseSolutions" nillable="true" minOccurs="0" type="tns:QueryResult"/>

Anyway, does anybody have any ideas on how I can do this. Just a simple button that copies the text from the
Solution.SolutionNote
Field and put it into
Cases.Resolution__c

Thanks!

Hello All.
I have made a new custom object called PETE items. Basically when our software has a bug, we put it into this internal development software (PETE). When phone support people find a bug, they report it through PETE, so it is nice to be able to keep track of what cases are waiting for what development fixes, hence I made the PETE items custom object. I want this to work similar to solutions, and have a few questions. (I am very new to coding s-controls, and have a fundamental understanding of javascript, but all of Salesforce's queries and special commands are very tricky).

1) I pretty much want to replicate the solutions functionality through and through, the attaching, searching, all that good stuff. Does anybody have a way that I can just copy the solutions and all it's functionality and modify it to my needs? I need to keep solutions in tact though. I know this probably isn'g going to happen, just figured it's worth a shot.

2) I want to add a save and return to case button, say you are entering a case, need to create a PETE item, so you click the New on the PETE items related list. This brings you to a screen to enter your PETE item, which is very cool. However, once you save it, I want it to return you to your case you were working on. I planed to make a custom button called "Save and Return" but am confused on how to code it. I have all the field names that could be updated from this form pasted below (straight out of the WSDL).

<complexType name="PETE_Items__c">

    <complexContent>

    <extension base="ens:sObject">

    <sequence>
<element name="Account__c" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="Account__r" nillable="true" minOccurs="0" type="ens:Account"/>
<element name="Attachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Case__c" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="Case__r" nillable="true" minOccurs="0" type="ens:Case"/>
<element name="Change_Type__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Comments__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Contact__c" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="Contact__r" nillable="true" minOccurs="0" type="ens:Contact"/>
<element name="CreatedBy" nillable="true" minOccurs="0" type="ens:User"/>
<element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="Description__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Histories" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="How_to_Reproduce__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="IsDeleted" nillable="true" minOccurs="0" type="xsd:boolean"/>
<element name="LastModifiedBy" nillable="true" minOccurs="0" type="ens:User"/>
<element name="LastModifiedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="LastModifiedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="Name" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Notes" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="NotesAndAttachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="PETE_ID__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Present_in_Build__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="ProcessInstances" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="ProcessSteps" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Subject__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="SystemModstamp" nillable="true" minOccurs="0" type="xsd:dateTime"/>
</sequence>
</extension>
</complexContent>

3) How can I add an "Attach" button to the PETE items related list, say you didn't want to create a new item, but wanted to attach an existing one, what would be the code for that?

4) PETE items, like cases must be attached to contacts and accounts, in a case when you attach it to a contact, the account is automatically filled in, I would like to replicate this behavior. I have 2 lookup fields, but they don't seem to be "linked" so selecting a contact doesn't select an account.

If you have any idea on any of these, or even some links for reading that would help, please let me know. Thank you!
Hello all,
I am the administrator for my companies Salesforce deployment, (been working with it for about 6 months now). They have asked that I create a system that will allow us to push and receive data from our external development tracking system (AQdevteam client, PETE). I have been doing a lot of reading, and trying to find the best way to do this. Basically the hope is that we can click one button from one of our cases, and it will send all the information about the case to our development system, the dev system will create a tracking number which it will return to sales force, and then upon request (or automatically) salesforce can query the system to get the status on this development item. I figured the easiest way to send data would be to make a button that sends several URL variables to a web page that we control, and it could record those sent variables into a database, which our development system could then query and make an item. The question then is, what is the best way for our development system to push data back into salesforce on request (or automatically, doesn't matter which). I am have some web coding skills (HTML, Cold Fusion, SQL, but no XML, or SOAP, or APEX). Our programming team is skilled in Delphi, and .NET, and will also be able to do some SOAP. So we are thinking that the development items will initially be created using URL variables passed to a page, and to refresh it we will have a .NET service that watches for changes in the dev tool and pushes them back into Salesforce using SOAP probably. Does this make sence? Am I completely on the wrong path, is there an easier way to do this? Thanks for any feedback!
Okay, Salesforce has really been getting on my nerves lately.
I have run across, yet another strange bug. Apperantly the subject of a case in considered a pick list?! It is not, it is a text field. Look at this picture of a workflow rule I have been trying to create. The premise is simple, if the subject contains the word spam (our mail server marks anything it thinks is spam this way) then change the status to junk. Why can't I do this?

I know this is not the right area, but I could not for the life of me where to file a bug report. Here is the deal,
The new version of internet explorer seems to cause problems in the Console View. IE Version 7.0.6001.18000 received the error

Line: 120
Char 5
Error: 'Desktop' is undefined
Code: 0
URL: https://na2.salesforce.com/ui/desktop/desktoppage

Our console works on other versions of IE, but the one above causes the error listed. Any ideas, or just wait for Salesforce to fix, or do I have something configured wrong?


Message Edited by Kenji776 on 06-25-2008 09:17 AM
Hey all,
I got a  new request today that I think should be possible, but I can't think of a good way to do it. Here is the request:

"Can we make it so that when you send the first email from a case that was not created by an email, it pulls the description into the body, and the case subject into the Email Subject?"

Basically it just needs to look at the case origin. If the origin was not email, make the email grab the subject from the case subject line and the body from the case description area. Any idea if this is something that can be done?
Hello all,
This is probably not quite the right area for this question, but I could not find a better spot, so admins feel free to move it, I won't be offended :P Anyway, my users have requested a few features, which despite my trying I haven't through of a good way to do.

1) Case age incremental counter. Basically, every day a case is not closed, they want the age to increment by one. The catch is, if a case goes to closed, then reopens, they want the counter to zero out, and restart. So a regular formula that calculates based on createdate, and closed date, or now() won't help. Perhaps a C# app that logins in once a night and increments all open cases by one day? Is there a better way. I wanted to use workflow rules, but the timed triggers only occure once if I understand them correctly, so this wouldn't work. Anyone have any good ideas?

2) Ability to automatically change case status on the send an email page. They state that it is a bit of a hassle to go change the case status after they send an email. Once we send an email we always change the case status to "waiting for customer". Again perhaps a workflow rule would work here, but not totally sure how I would impliment it. As a side note, can you customize the send an email page at all? I was unable to find an area you were could customize that page at all. It seems to be classified as a Task, but nowhere did I see a page layout, or set of record types that specify it as an email page.

3) Autopopulate a field. For some reason they would like a case that is created for an accout to automatically pull some info from the account for easy rerfence. For instance, the account keeps track of what software an account uses. They would like that same information on the case as well. I don't really care if you can do this or not, but I would at least like to provide proof that it can't be done, or would be a ton of work.

Anyway, let me know what you think about the above questions. Let me know if I can provide more info of be of more help.
Hey All,
I finished writting my trigger that helps grab info from the web to case form and fill in the case fields as needed, and create/update contacts as needed, but I'm stuck at 62% code coverage and I don't know why. It's only one function, and the test code im providing should get it inside the if statment(s). Any ideas?

Code:
public class WebtoCaseWorkflow 
{
 //This Class will take the information passed in by the web to case form, and basically copy it into
 //the proper fields on the case. Also, it will update contact information if the contact already exists,
 //or create a contact if they do not. 
 
 //Information expected to be passed: Web_First_Name__c, Web_Last_Name__c, SuppliedEmail, SuppliedPhone, CID__c
 //along with the regular case information, eg. subject and description.
 
 //This trigger should not run if the source is Phone, or Email, only if the case is coming from the web.

 public static void QueryAndUpdateCase(Case[] caseitem)
 {
  string AccountIsValid = 'undefined';
  //With the CID passed from the web form, let's try to find the matching account in SF
  for (Case c:caseitem)
  {
   //Make sure this case is coming from the web form before doing anything else.
   if(c.Origin == 'Web')
   {
    //Search for any accounts with the same CID as the one passed in.
             Account[] AccountResult = [SELECT CID__c, Name, Id FROM Account WHERE CID__c = :c.CID__c];
    
      //If we find a match on the CID (which we should, every time)
      //Set the account info for this case.
      
         if(AccountResult.size() > 0)
      {  
     c.AccountId = AccountResult[0].Id;
     AccountIsValid = 'yes';
      }
      
      if(AccountResult.size() < 0)
      {  
     // some kind of error handling should go here. Without a proper account
     // linking we won't be able to add a contact.
     AccountIsValid = 'no';
      }
  
    //Now with the account linked up, let's deal with the contact portion.
 
    //Query for a contact with the same email as the one provided, since email has to be unique.
             Contact[] ContactResult = [SELECT Name, Id, Phone, FirstName, LastName FROM Contact WHERE email = :c.SuppliedEmail];
    
     
     //----------------------------------Found a Contact Match----------------------------------// 
         if(ContactResult.size() > 0)
      {  
       
       //Update the contact record with the information they give us, 
       //since they are giving us updated info, might as well use it.
       for (Contact q:ContactResult)
       {
      q.Phone = c.SuppliedPhone;
      q.FirstName = c.Web_First_Name__c;
      q.LastName = c.Web_Last_Name__c;
     }
     
     //Set the ID of the contact as the one retreived from the query. With just the ID
     //Salesforce can query the contact record and fetch the name, phone number, and email.
     c.ContactId = ContactResult[0].Id;
      }
      
      //--------------------------------Did not find a Contact Match-------------------------//
      if(ContactResult.size() < 1)
      {
       //If the CID they gave was valid, and can be hooked to an account, link the contact
       //to that account as well.
       if(AccountIsValid == 'yes')
       {
        //If the contact does not exist, let's make it using the info provided from the form.
        Contact ContactMake = new Contact(FirstName=c.Web_First_Name__c, LastName=c.Web_Last_Name__c, Email=c.SuppliedEmail, Phone=c.SuppliedPhone, AccountId=AccountResult[0].Id); insert ContactMake;
         CONTACT[] getContactId = [SELECT Id FROM Contact WHERE Email = :c.SuppliedEmail];
         c.ContactId = getContactId[0].Id;
       }
       
       //If the CID they gave us was not valid, and did match to an account, create the contact,
       //but don't attempt to link it to an account since we don't know what account they belong to!
       if(AccountIsValid == 'no')
       {
        //If the contact does not exist, let's make it using the info provided from the form.
        Contact ContactMake = new Contact(FirstName=c.Web_First_Name__c, LastName=c.Web_Last_Name__c, Email=c.SuppliedEmail, Phone=c.SuppliedPhone); insert ContactMake;
         CONTACT[] getContactId = [SELECT Id FROM Contact WHERE Email = :c.SuppliedEmail];
         c.ContactId = getContactId[0].Id;
       }
        
      }
      
      //Okay I think we are done. We have now update the case with both account and contact information
      //that we received from the web form. Hopefully it didn't blow up and die.
   } 
  }
 }
 
 public static testMethod void QueryAndUpdateCaseTest()
 {
   //Create an account and retreive account #
   Account AccountMake = new Account(Name='test123'); insert AccountMake; 
   ACCOUNT[] getAccountId = [SELECT Id FROM Account WHERE name = 'test123'];
   
   //Create a contact that belongs to the account we just made, and retreive the ID
   Contact ContactMake = new Contact(LastName='testJohnson', FirstName='test', Email='frank@frank.com', AccountId=getAccountId[0].Id); insert ContactMake;
   CONTACT[] getContactId = [SELECT Id, FirstName, LastName FROM Contact WHERE LastName = 'testJohnson'];
   
   //Create a case that belongs to the contact we just made, then fetch it's ID.
   Case CaseMake = new Case(ContactId=getContactId[0].Id, Status='open', Problem__c='Other', Origin='Web', Subject='testcase21313213', description='test case of joy', PETE_ID__c='ADY2342342', SuppliedPhone='(345)-352-6244', SuppliedEmail='frank@frank.com', CID__c='141231', SuppliedName='Frank Johnson', SuppliedCompany='test123' ); insert CaseMake;
   CASE[] getCaseId = [SELECT Id, Origin, SuppliedPhone, SuppliedEmail, CID__c, Web_First_Name__c, Web_Last_Name__c, SuppliedCompany  FROM Case WHERE Subject = 'testcase21313213'];

   //Call the main script that autofills those boxes, and pass the array returned from the above query.
    WebtoCaseWorkflow.QueryAndUpdateCase(getCaseId);

 }
}

 

Hello all,
I just wrote my first Apex trigger, and deployed it to production. Now I need to make a change to it, but I cannot seem to convince eclipes that overwritting is a valid action. I changed my trigger, saved it, selected the class and the trigger from the list of things to update, and it keeps telling me "Please select at least one component to be deployed".





Can somebody please help, I desperatly need to disable one part of my trigger, or the whole thing, but I can't modify it at all! HELP!
Hey everyone,
I just wrote my first apex script today, all it does is autofill some boxes based on information it can pull based on the case number. I am extremely confused, and to be honest, quite angry with this whole testing, code coverage thing. It doesn't make any sense to me at all, I don't need freaking big brother forcing me to error check my code, I'd rather deal with errors than have to put up with this crap. Anyway, I am wondering how I would write the required code to make this test and be able to be deployed.

public class AutoFillPete
{
public static void PETEFILL(PETE_Items__c[] pete)
{
for (PETE_Items__c p:pete)
{
CASE[] contactResult = [SELECT ContactId,AccountId FROM CASE WHERE id = :p.Case__c];
ACCOUNT[] accountResult = [SELECT CID__c FROM ACCOUNT WHERE id = :contactResult[0].AccountId];

if(contactResult.size() > 0)
{
p.Contact__c = contactResult[0].ContactId;
p.Account__c = contactResult[0].AccountId;
p.CID__c = accountResult[0].CID__c;
}
}
}
}

Can someone help me write the code that will be needed to make this deployable (I am still working on sifting through the 14 different guides that are needed to deploy an app to production, I have no idea what I'm doing on that either, something about ant, and such).
I have encountered a bug when trying to deploy where it says I have not selected any components when in fact components are selected. This occurs on step 3 when using the deselect all and sorting abilities.

I usually wouldn't be so quick to call this a bug but I have been able to replicate this issue on two different machines.

Eclipse: 3.3.1.1
Force.com IDE: 11.1.1.200801181701
Latest version of Java.

1. Deselect All
2. Sort by Type

or

1. Sort by Type
2. Deselect All

3. Select a component and then hit Validate it will say, please select at least one component. Hitting Next will cause it to fail.

With that latest release of the toolkit and its ability to deploy nearly every custom object we have a list of about 200 components to sort through when deploying so not have these deselect all and sort abilities makes it a little more difficult.

Thanks.


Message Edited by TehNrd on 02-19-2008 02:45 PM
  • February 19, 2008
  • Like
  • 0