• 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!

Quick question. I have two different custom objects, 'FTP File' and 'FTP File Configuration'. I need to calculate the last date the FTP file was received to determine if the file was late.

The name of an FTP file is contained within an FTP file configuration. For example, an FTP file configuration named ABC001234 will have associated files called ABC001234_11012017081530.ftp, ABC001234_11022017081929.ftp, and ABC001234_11032017080117.ftp.

Normally, once processed, an FTP file will have the name (lookup field) of the FTP file configuration filled in. However, depending on when the FTP file record is created, it could be blank. I am trying to setup a decision that will (lead to a) lookup and find the FTP file configuration record. In the condition for the lookup I am saying 'FTP configuration name contains the FTP file name'. However, because the FTP file name is longer than the FTP file configuration name, the condition is never met (ABC001234 does not contain ABC001234_11032017080117.ftp).

I was wondering if there is a way to truncate the FTP file name so that only the FTP file configuration name is used as part of the condition. The FTP file will always use the format [FTP File Config Name]_[date/time].ftp. If I could truncate the file name prior to the underscore I could use the contains or equal. I do not know how to do this, however. I saw some examples for using MID but the FTP file configuration names are not always the same length.

Does anyone have any suggestions? Is this a formula in the flow or something else?

Thanks so much for any help you can provide!

 
Good afternoon!

We currently have a flow that locates cases randomly to quality check our agents. The system then creates a new case (quality case) and links the original (agent) case. This was done so that the agent / owner of the original case does not know which case(s) have been quality checked (among other reasons). The problem is that the original case often has attachments that need to be accessed in order to quality check the case. The quality analysts can click a link to access the original case and open the attachments but, due to the volume, the extra clicks are becoming a time waster. Ideally, we would be able to access all of the original case's information from the quality case. We have pulled over the most needed information into the quality case but I can't seem to successfully copy the attachments to the quality case. I see references to people doing this successfully online so it appears it can be done. Right now, I have a flow that looks up the case, looks up all attachments on the case, and then loops the attachments. From that point I have tried to both move and copy the attachments by changing / copying the parent IDs. I have hard coded two parennt IDs (cases) for now for testing. However, I can't get either to work. Changing the parent ID does appear to change it but I do not see the attachments moving from one case to another. (I assume I would see the attachments under the other case if I changed the parent ID). If I try to create new attachments I get an unhandled fault. It looks like all of our attachments are stored like the following: https://cs12.content.force.com/servlet/servlet.FileDownload?file={!Attachment.Id}. This is the path I was trying to use but, obviously, something isn't correct. Can someone provide some suggestions on how this should be handled? Thanks so much!

Melissa
Good morning! I am stuck and hoping someone can assist me. I am very new to visual workflow and just trying to muddle my way through my project. 

We have a department that needs to have their cases 'quality checked'. There are 11 users setup in a round-robin type rotation. The rotation is a custom object so I added a field to house the number of cases each user should have QC'd. Normally users should have either all of their cases QC'd or a subset of cases QC'd everyday. I have been able to successfully find the users,find the cases, find the level of QC, and create (new) 'QC cases' that are assigned to another team. I have only been able to do this for users that need 100% QC, however. Once I get to the part where I need to find the level of QC (less than all) and then output that number of cases, I am stuck. This will be an auto-launched flow so I have placed an email where I believe the other logic should go. However, being so new to visual workflow, I am not sure if I am even on the right track. Right now, everything is in a loop, which contains a loop and a decision. I have a two part question, therefore.

Does this flow have the correct structure?

How do I limit the output of cases to only the level of QC? (QC works as 1 new QC case = 1 case to be QC'd)

My flow is below. Thanks so much in advance!

User-added image

 
Good afternoon!

I was wondering if someone could further assist with the following question from August: https://developer.salesforce.com/forums/ForumsMain?id=906F0000000g0j0IAA.

The original question was:

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);
}

I received the following response that caused an error I do not understand:
 
trigger CopyEmail on EmailMessage (after insert) {

List<EmailMessage>emailmlist=new List<EmailMessage>();

map<ID,RecordType>mapval=new map<ID,RecordType>([SELECT DeveloperName,Id,IsActive,SobjectType FROM RecordType WHERE DeveloperName IN ('Salesforce_Support','Salesforce_Training','Salesforce_Projects') AND SobjectType = 'EmailMessage' AND IsActive=true]);
system.debug('-----'+mapval);


for(EmailMessage e:Trigger.new){

  if(e.recordtypeid!null){

     if((mapval.get(e.recordtypeid).DeveloperName=='Salesforce_Support' ) || (mapval.get(e.recordtypeid).DeveloperName=='Salesforce_Training' ) || (mapval.get(e.recordtypeid).DeveloperName=='Salesforce_Projects' )){
       
emailmlist.add(e);
      
}

}

}

if(emailmlist.size()>0){
    CopyEmailCode.copyEmail(emailmlist);

}
}

The error was: Invalid field recordtypeid for SObject EmailMessage

The only thing I am trying to accomplish is to trigger a pre-written Apex class based on a specific record type. Basically, we have 4 different departments using cases and I want to be able to copy emails to the case comments section to allow a user to follow a chain of communication (instead of trying to go through emails). We exclusively use email-to-case so we never have customer case comments. This makes following what is going on difficult. I found and installed the code here https://success.salesforce.com/answers?id=90630000000glk9AAA. This works great but I need it to only work on specific record types so I can turn it off for the department that doesn't want to use it. I also noticed that the emails sent by that department are too long and error with this code. 

I am just looking for a solution to that problem. Any help anyone can provide would be much appreciated!!

Thanks
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!
Good morning! I was wondering if it is possible to generate an auto-number value only if a certain value is selected from a picklist. For example, I am setting up cases for our internal salesforce support team. I would like a way to track defects so I can report on them later. I have a subtype picklist field (Sub_Type__c) that contains a value of 'Defect'. I also have a defect number field (Defect_Number__c) that is an auto number. I would like to only assign an auto number when 'Defect' is selected from the picklist. Enhancement, another value, would not get a defect number, for example.

If there is a better way to do this please let me know as well. I see this is an enhancement requested to Salesforce but I did not see that it has implemented to this point. I assume there must be work-arounds then.

Thanks so much!!
Good morning! I am stuck and hoping someone can assist me. I am very new to visual workflow and just trying to muddle my way through my project. 

We have a department that needs to have their cases 'quality checked'. There are 11 users setup in a round-robin type rotation. The rotation is a custom object so I added a field to house the number of cases each user should have QC'd. Normally users should have either all of their cases QC'd or a subset of cases QC'd everyday. I have been able to successfully find the users,find the cases, find the level of QC, and create (new) 'QC cases' that are assigned to another team. I have only been able to do this for users that need 100% QC, however. Once I get to the part where I need to find the level of QC (less than all) and then output that number of cases, I am stuck. This will be an auto-launched flow so I have placed an email where I believe the other logic should go. However, being so new to visual workflow, I am not sure if I am even on the right track. Right now, everything is in a loop, which contains a loop and a decision. I have a two part question, therefore.

Does this flow have the correct structure?

How do I limit the output of cases to only the level of QC? (QC works as 1 new QC case = 1 case to be QC'd)

My flow is below. Thanks so much in advance!

User-added image

 
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!