• Melissa G
  • NEWBIE
  • 20 Points
  • Member since 2015
  • CRM Admin

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 6
    Replies
Hi! I am trying to edit some code to copy an email message to case comments based on specific record types. I have two or three record types to add. I have little coding experience so I understand the logic of what I need to do, just not the actual code. I found code for this trigger & class online and it works great as it stands (for all record types). I found additional code for selecting the record type, which it appears to do, but I have no idea how to add additional record types to the query or what to do after the record type is selected. Can someone help me fill in the blanks? The trigger is CopyEmail and the class is CopyEmailCode. Thanks!
 
trigger CopyEmail on EmailMessage (after insert) {
Id recordTypeId = [Select Id From RecordType Where DeveloperName = 'Salesforce_Support'].Id;

/*
How do I add a second and third record type of ‘Salesforce_Projects’ & ‘Salesforce_Training’?
Then, what else goes here to make it only select the requested record types?
*/

    CopyEmailCode.copyEmail(Trigger.new);
}
Thanks so much in advance!
 
Good afternoon! I am new here and have little development experience. I am just looking for some direction on how to approach this issue.

I have a client that has purchased a marketing list. The list has 3100 leads and each lead has a unique code associated to it. We will be loading the list (and code) to Salesforce for the client. Once this is loaded, he is looking to do the following:

- The lead (person) is sent a mailing with the unique code (this is done automatically through another app). The lead would be directed to go to a web form to enter the code on the mailing. Once the code is entered /  submitted the lead information (name, address, etc.) from Salesforce will populate the form.

- Once the form is populated the lead will be able to either confirm (submit) the form or edit it and then submit it.

- If the lead does not have his or her code they should be able to enter their information manually

- Once submitted Salesforce will create a task for the lead owner to follow up with the lead.

- Once the lead submits the information on the webform the lead in Salesforce should flip to an prospect

I posted this question to the success community and it sounds like Web-to-lead will not fit all of the requirements for this request. Can someone point me in the correct direction to start on this project? Since web-to-lead isn't an option I was pretty sure this would be done with visualforce / apex. However, there is a whole lot of information covered in a general visualforce / apex book. What should I start with in order to create this?

Thanks so much!
Hi!

I have the following button on a page layout for my users that use cases. The button works great when I login (admin). However, when I login as the user nothing happens when the button is clicked. It appears the page refreshes but no information changes. Can anyone suggest why this is happening? Is it permission related? 

{!REQUIRESCRIPT("/soap/ajax/22.0/connection.js")}

var updateRecord = new Array();
var myquery = "SELECT Id FROM Case WHERE Id = '{!Case.Id}' limit 1";

result = sforce.connection.query(myquery);
records = result.getArray("records");

if(records[0])
{
var update_Case = records[0];
update_Case.OwnerId = "{!$User.Id}";
update_Case.Status = "In Progress";
updateRecord.push(update_Case);
}

result = sforce.connection.update(updateRecord);
parent.location.href = parent.location.href;
Good morning!

I have two validation rules in place. One is to not allow users to open a closed case and another to not allow a change of ownership on a closed case. However, the client has asked if we can change these rules to allow these functions by the case owner. Can someone tell me how to add this functionality? The validation rules are below.

AND(
ISCHANGED(Status),
ISPICKVAL(PRIORVALUE(Status), "Closed"),
$Profile.Name <> "System Administrator",
$User.Id <> '00580000004yyXl'
)

AND(
IsClosed,
ISCHANGED(OwnerId),
$Profile.Name <> "System Administrator",
$User.Id <> '00580000004yyXl'
)

Thank you for any help you can provide in this!

Melissa
Good morning! I was wondering if it is possible to use a custom link to auto populate a custom field on a case.

I have a lookfield (Requestor__c) that I would like to auto populate with the current user (only internal users will be submitting cases). I would like when a user clicks on a custom link (new support ticket) it would bring up the support record type with the requester name filled in with their name. Is this possible?

Thanks so much in advance!