• Ricardo Ortega
  • NEWBIE
  • 0 Points
  • Member since 2013

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

I have an object which has a lookup field to contacts. Is it possible that when I relate a contact to this object I can either create a task or notify the contact by email that he has been assigned this task? Since we are using the Salesforce for outlook tool, we are trying to make the tool as dynamic as possible with notifications sent my email. Thanks

What information can be pulled from Salesforce about the users and how they interact with the tool? What reports can be done about user interaction and where can I find this information? Thanks

How can I change the format information is presented when I use a lookup field? To be more specific, if I relate a contact to an event with a lookup field, and I click on the magnifying glass icon to look for my contact, how can I show all contacts instead of just recently used?

I am using the Salesforce Data Loader Command Line (CLIq) to upsert contacts from a csv. I am using the latest version of the Salesforce DataLoader (28 I think) and the latest version of the data loader available 2.3.0. When I try any action (export, insert, upsert) it throws an error that says "Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:permissionable' but found 'urn:partner.soap.sforce.com:precision'". I've tried many things including turning the firewall off and to no avail. Thanks.

 

PS: I am account administrator.

Hello, I am new to the Salesforce programming world and I'm trying to create an apex trigger before insert. My object is a trip__c and It has a lookup to an account. I want to validate that before insertion is done, that the account name doesn't have the word "region" in it. Also, I would like if you could provide me with a guidance as to where I can learn the Salesforce apex language to create triggers, classes, pages, etc... Thank you.

I have a csv full of contacts in a server that can be accessed through FTP. What I need is to get that csv and upload it to salesforce every 4 hours. I also need to avoid creating duplicate contacts at the upload time . Besides that, I have to create upload rules that some fields do not change the information if it was changed in Salesforce. For example, i upload a second time the telephone from John, in the csv its 1-800-000-00000 but in salesforce its 1-800-000-00001, so the Salesforce information of that field goes first than the csv. With other fields its the other way around, like an email address in the csv goes first than the email from Salesforce. Any idea how to do this? Thank you very much.

I have a custom object called trip. This object has a name, its owner id, a date field and some other fields. I want to create a trigger that executes after (or before) the insertion of the new trip, to create a new event with the information some of the info of the newly created trip. I am new to apex code so I am asking for help. To select the information I want to extract from the newly created trip do I need to look it up using a list ?

 

Thank you

I have a custom object called trip. This object has a name, its owner id, a date field and some other fields. I want to create a trigger that executes after (or before) the insertion of the new trip, to create a new event with the information some of the info of the newly created trip. I am new to apex code so I am asking for help. To select the information I want to extract from the newly created trip do I need to look it up using a list ?

 

All i got so far was 

 

 

trigger calendar_event on Trip__c (after insert) {

  Event evt = new Event();

}

 

 

Thank you

I have a junction object with 2 master detail relationships, one to contacts and another one to a custom object named program. I currently have 2  fields, the contact field and the porgram field. I am using workforce rules to avoid duplicates. What I want to know is that, apparently the junction object has to have a name, whether filled manually or numeric.

 

Is there a way that when i choose the contact and the program, autofill the name with a default value? Problem is, when a duplicate is created, it says "the following duplicate already exists: 12" .  If I let the user fill out a random name and then set a field update to change the name, it just feels wrong. 

I have a junction object with to MD-relationships, one for contact and one for a custom object named program. The trigger works fine in the sandbox and i have to test it to use it in production. I tried writing the test code but it doesn't  work. Can someone please help me, what code do I need to write for the testing of this trigger and where do I have to place it?

 

trigger insert_case on Affiliated_Programs__c (before insert, before update) {
   for (Affiliated_Programs__c ci : trigger.new) {

   //Checks the database for all affiliated programs with the same program and contact
      List<Affiliated_Programs__c> resultList = [SELECT id, Name FROM Affiliated_Programs__c
      WHERE Contact__c = :ci.Contact__c
      AND Program__c = :ci.Program__c];

   // Raise the error back if any records found
       if (!resultList.isEmpty()) {
          System.debug('Found another copy ' + resultList[0].id + ' name is ' + resultList[0].Name);
          ci.addError('Duplicate record, a Contact is already related to that program');
       }
   }
}

Is there a simple way to avoid duplicates of a junction object? I have a contact master detail and a program master detail. If there is a very simple way using a text field please let me know. If its using the default value please give me a code example Thanks!

I have a junction object with two master detail relationships, one to contact and one to program. I was told to create a text field that is Unique and has default value ContactName and ProgramName to avoid duplicates. Problem is, i write Contact__r.Email & "-" & Program__r.Name and it always says either it doesn't exist or it cant be used there.

I have a junction object with two master relationships, one to contacts and one to a custom object named Program. I wanted to avoid the duplication of the junction object using a workforce rule (i know it can be done with trigger but bear with me). I created a field named "duplicate test" that is set to avoid duplicates . Then I went to create a workforce rule that is set to my junction object and has no criteria YET. Then I added to immediate workflow actions a field update that is set to my new "duplicate test" and i assigned the formula "CASESAFEID(Contact__c) & '-' & CASESAFEID(Program__c)".  I tried too "Contact__r.Email &"-'&Program__r.Name" but to no avail.

 

Problem is, neither are working (i already activated that wf). The field update doesn't set any value and therefore it doesn't test for duplicate. Also can someone tell me what criteria should I put in the wf rule? Thanks,

Hello, I wanted to know if you could tell me how can I validate that a person cant create a junction object twice using the same relationships. For example, I have a junction object between contacts and programs and i dont want people create the same junction object using a contact that is already with one program. I created a trigger to help me before insert and update but I havent been able to test it (**bleep** tests -_-) so I want to know if there is a way to make the information unique without using the trigger. Thanks

Hello, I recently created my first apex trigger and Im not really sure what the procedure is for the testing and developing of said trigger and quite frankly i didnt understand much about the apex testing page.

 

My apex trigger checks that you cant create a junction object that already relates a contact to a specified program more than once. 

 

trigger insert_case on Affiliated_Programs__c (before upsert) {
       for (Affiliated_Programs__c ci : trigger.new) {

            //Checks the database for all affiliated programs with the same program and contact
             List<Affiliated_Programs__c> resultList = [SELECT id, Name FROM Affiliated_Programs__c
                          WHERE Contact__c = :ci.Contact__c
                           AND Program__c = :ci.Program__c];

             // Raise the error back if any records found
             if (!resultList.isEmpty()) {
                           System.debug('Found another copy ' + resultList[0].id + ' name is ' + resultList[0].Name);
                           ci.addError('Duplicate record, a Contact is already related to that program');
              }
       }
}

 

Thank you very much

I have a junction object with 2 master detail relationships, one to contacts and another one to a custom object named program. I currently have 2  fields, the contact field and the porgram field. I am using workforce rules to avoid duplicates. What I want to know is that, apparently the junction object has to have a name, whether filled manually or numeric.

 

Is there a way that when i choose the contact and the program, autofill the name with a default value? Problem is, when a duplicate is created, it says "the following duplicate already exists: 12" .  If I let the user fill out a random name and then set a field update to change the name, it just feels wrong. 

I have a junction object with to MD-relationships, one for contact and one for a custom object named program. The trigger works fine in the sandbox and i have to test it to use it in production. I tried writing the test code but it doesn't  work. Can someone please help me, what code do I need to write for the testing of this trigger and where do I have to place it?

 

trigger insert_case on Affiliated_Programs__c (before insert, before update) {
   for (Affiliated_Programs__c ci : trigger.new) {

   //Checks the database for all affiliated programs with the same program and contact
      List<Affiliated_Programs__c> resultList = [SELECT id, Name FROM Affiliated_Programs__c
      WHERE Contact__c = :ci.Contact__c
      AND Program__c = :ci.Program__c];

   // Raise the error back if any records found
       if (!resultList.isEmpty()) {
          System.debug('Found another copy ' + resultList[0].id + ' name is ' + resultList[0].Name);
          ci.addError('Duplicate record, a Contact is already related to that program');
       }
   }
}

I have a junction object with two master detail relationships, one to contact and one to program. I was told to create a text field that is Unique and has default value ContactName and ProgramName to avoid duplicates. Problem is, i write Contact__r.Email & "-" & Program__r.Name and it always says either it doesn't exist or it cant be used there.

I have a junction object with two master relationships, one to contacts and one to a custom object named Program. I wanted to avoid the duplication of the junction object using a workforce rule (i know it can be done with trigger but bear with me). I created a field named "duplicate test" that is set to avoid duplicates . Then I went to create a workforce rule that is set to my junction object and has no criteria YET. Then I added to immediate workflow actions a field update that is set to my new "duplicate test" and i assigned the formula "CASESAFEID(Contact__c) & '-' & CASESAFEID(Program__c)".  I tried too "Contact__r.Email &"-'&Program__r.Name" but to no avail.

 

Problem is, neither are working (i already activated that wf). The field update doesn't set any value and therefore it doesn't test for duplicate. Also can someone tell me what criteria should I put in the wf rule? Thanks,

Hello, I wanted to know if you could tell me how can I validate that a person cant create a junction object twice using the same relationships. For example, I have a junction object between contacts and programs and i dont want people create the same junction object using a contact that is already with one program. I created a trigger to help me before insert and update but I havent been able to test it (**bleep** tests -_-) so I want to know if there is a way to make the information unique without using the trigger. Thanks