• NEWBIE
• 0 Points
• Member since 2010

• Chatter
Feed
• 0
• 0
• 0
Likes Given
• 3
Questions
• 9
Replies

Hi,

I am trying to get a workflow to work in an Account object whenever a User object field meets a criteria. i.e., I need to  update a field value in the Account object whenever the Pilot Profile of the Account Owner is equal to IAM but I have not been successful.

I thought since the User field are available, I can use it as a trigger.  Any thoughts?

Help is much appreciated.

Thanks,

I have been trying to get the published solution of omitting weekends when calculating between two dates in a workflow but my limited skills hit rock bottom.  And that is why I need the forum's help.

I need to assign recurring tasks to our Reps initially every 7 days then every 28 days but I need to exclude weekends.  I found the formula to do the calculcation below but I don't really know how to use it.  HELP!

Weekday Count Formula:

CASE(MOD( StartDate__c - DATE(1985,6,24),7),

0 , CASE( MOD( EndDate__c - StartDate__c ,7),1,2,2,3,3,4,4,5,5,5,6,5,1),
1 , CASE( MOD( EndDate__c - StartDate__c ,7),1,2,2,3,3,4,4,4,5,4,6,5,1),
2 , CASE( MOD( EndDate__c - StartDate__c ,7),1,2,2,3,3,3,4,3,5,4,6,5,1),
3 , CASE( MOD( EndDate__c - StartDate__c ,7),1,2,2,2,3,2,4,3,5,4,6,5,1),
4 , CASE( MOD( EndDate__c - StartDate__c ,7),1,1,2,1,3,2,4,3,5,4,6,5,1),
5 , CASE( MOD( EndDate__c - StartDate__c ,7),1,0,2,1,3,2,4,3,5,4,6,5,0),
6 , CASE( MOD( EndDate__c - StartDate__c ,7),1,1,2,2,3,3,4,4,5,5,6,5,0),
999)
+
(FLOOR(( EndDate__c - StartDate__c )/7)*5)

Weekend Days Count Formula:

CASE(MOD( StartDate__c - DATE(1985,6,24),7),
0 , CASE( MOD( EndDate__c - StartDate__c, 7),1,0,2,0,3,0,4,0,5,1,6,2,0),
1 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,0,3,0,4,0,5,2,2),
2 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,0,3,1,2),
3 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,1,2),
4 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,1,2),
5 , CASE( MOD( EndDate__c - StartDate__c, 7),0,1,2),
6 , CASE( MOD( EndDate__c - StartDate__c, 7),6,2,1),
999)
+
(FLOOR(( EndDate__c - StartDate__c )/7)*2)

Hi I have a workflow (formula not criteria driven) that I want to get triggered if a new case comment is created by another user (not the case creator) but it does not seem to work.  Could anyone, someone, please help?!!

AND( CreatedById  <>   Parent.CreatedById ,  OR(ISPICKVAL(Parent.Division__c,"Quebec"), ISPICKVAL(Parent.Division__c,"British Columbia"),ISPICKVAL(Parent.Division__c,"Alberta"), ISPICKVAL
(Parent.Division__c,"Atlantic"), ISPICKVAL
(Parent.Division__c,"Ontario")))

Thanks.

Hello,

Can you please explain what dupe catcher is? What are the uses ? Please give me a scenario

Can we upload a batch of loads and still make the dupe catcher working?

Help would be appreciated

Thanks

I have a scenario right now where we have had to change many products on Opportunities based on Opportunity Type. I have the SOQL, etc...all working to find the correct products I need to change and the correct PriceBookEntryId to update for the line items.

But looks like I cannot update the PriceBookEntryId field on OpportunityLineItem object. Is this correct? Is the only way to do what I need to do really to insert new line items and delete the old line items?  This is a ton of rows that I would need to do it and much easier/straight forward to simply update the pricebookentryid field.

Thanks for any thoughts or suggestions.

Hello – I followed all the setup instructions closely but every time I click on the GeoCode Tab it only comes back with the message “Your Done!”. Any suggestions? Thanks in Advance. Mike L.

Hi,

I am trying to override a new button on a custom object that is related to cases.  I am trying to do this as an s-control, and am trying to pass fields from the case into the custom object field.

I am not able to pass any of the fields from case to the custom object.  Is this possible to do using an s-control?

So far I have:

<html>
<title></title>
<script>

var newUrl = "{!URLFOR(  \$Action.Problem_Solving_Worksheet__c.New ,null,
[ Case_Number__c= Case.CaseNumber ,
Problem_Solving_Worksheet__c.Problem_Defenition__c = Case.Description ,

retURL=\$Request.retURL] ,true)}";

window.parent.location.replace(newUrl);
</script>

Have also tried using the 15digit field id code but then I get syntax errors when trying to save.

Any help much appreciated.

Thanks.

• April 01, 2010
• Like
• 0

I have been trying to get the published solution of omitting weekends when calculating between two dates in a workflow but my limited skills hit rock bottom.  And that is why I need the forum's help.

I need to assign recurring tasks to our Reps initially every 7 days then every 28 days but I need to exclude weekends.  I found the formula to do the calculcation below but I don't really know how to use it.  HELP!

Weekday Count Formula:

CASE(MOD( StartDate__c - DATE(1985,6,24),7),

0 , CASE( MOD( EndDate__c - StartDate__c ,7),1,2,2,3,3,4,4,5,5,5,6,5,1),
1 , CASE( MOD( EndDate__c - StartDate__c ,7),1,2,2,3,3,4,4,4,5,4,6,5,1),
2 , CASE( MOD( EndDate__c - StartDate__c ,7),1,2,2,3,3,3,4,3,5,4,6,5,1),
3 , CASE( MOD( EndDate__c - StartDate__c ,7),1,2,2,2,3,2,4,3,5,4,6,5,1),
4 , CASE( MOD( EndDate__c - StartDate__c ,7),1,1,2,1,3,2,4,3,5,4,6,5,1),
5 , CASE( MOD( EndDate__c - StartDate__c ,7),1,0,2,1,3,2,4,3,5,4,6,5,0),
6 , CASE( MOD( EndDate__c - StartDate__c ,7),1,1,2,2,3,3,4,4,5,5,6,5,0),
999)
+
(FLOOR(( EndDate__c - StartDate__c )/7)*5)

Weekend Days Count Formula:

CASE(MOD( StartDate__c - DATE(1985,6,24),7),
0 , CASE( MOD( EndDate__c - StartDate__c, 7),1,0,2,0,3,0,4,0,5,1,6,2,0),
1 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,0,3,0,4,0,5,2,2),
2 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,0,3,1,2),
3 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,1,2),
4 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,1,2),
5 , CASE( MOD( EndDate__c - StartDate__c, 7),0,1,2),
6 , CASE( MOD( EndDate__c - StartDate__c, 7),6,2,1),
999)
+
(FLOOR(( EndDate__c - StartDate__c )/7)*2)

Hi I have a workflow (formula not criteria driven) that I want to get triggered if a new case comment is created by another user (not the case creator) but it does not seem to work.  Could anyone, someone, please help?!!

AND( CreatedById  <>   Parent.CreatedById ,  OR(ISPICKVAL(Parent.Division__c,"Quebec"), ISPICKVAL(Parent.Division__c,"British Columbia"),ISPICKVAL(Parent.Division__c,"Alberta"), ISPICKVAL
(Parent.Division__c,"Atlantic"), ISPICKVAL
(Parent.Division__c,"Ontario")))

Thanks.

Hello All!

I have created a work flow rule on the 'Case Comment' object which sends an email alert to 'Case Owner' and 'Case Comment Creator'. Everything is working fine.

Now, I also want the email notification to be sent to 'Case Creator' too but not able to do so.

Any help how to implement this is much appreciated.

Thank you,

VK86

• February 17, 2010
• Like
• 0
Hello Guys & Gals,

I thought I'd throw this out to the community as something that others might find useful.

I've had to implement this a number of times now - as no doubt some of you have already seen - there is no related list to show the opportunity contact roles for a 'contact'

This S-Control provides pretty much the same functionality.

Any suggestions to improve this are welcome... let me know if you find this useful.

Ben :)

Code:
```<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3.org/TR/html4/loose.dtd">
<link href="/dCSS/Theme2/default/common.css" type="text/css" media="handheld,print,projection,screen,tty,tv"  rel="stylesheet" >
<link href="/dCSS/Theme2/default/custom.css" type="text/css" media="handheld,print,projection,screen,tty,tv"  rel="stylesheet" >

<html>
<script src="/soap/ajax/10.0/connection.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/functions.js"></script>
<script>
function Init() {

//////////////////////////////////////////////////////////////////////////////////////////////////
//
//             Developed March 2008
//               by Ben Ingram
//           beningram@hotmail.com
//  May be re-used or altered so long as the credit remains :)
//
//
//  This s-Control for salesforce.com provides
//  visibility of all oportunities for which a
//  contact is listed as an Opportunity Contact
//
//  To Implement this s-Control:
//    1. Add a new s-Control of type HTML
//    2. Insert this code (all) into the HTML Body of the new Control
//    3. Name the control something appropriate such as 'Contact_Opportunity_Roles'
//    4. Edit the appropriate page layout for 'Contacts'
//    5. Create a 'new section' to contain this inline s-control
//       I recommend immediately preceding the related list area
//    6. Drag the s-control from the list on the right into your new section
//    7. Set the properties of this s-control to set the height = 100
//    8. Enjoy :)
//
//////////////////////////////////////////////////////////////////////////////////////////////////

try{

// Query the SOQL to return the related OpportunityContact records, along with the parent Opportunity details as required
var SearchString="Select Id, ContactId, Role, IsPrimary, OpportunityId, Opportunity.Name, Opportunity.StageName From OpportunityContactRole Where ContactId = '{!Contact.Id}' ";
var queryResults = sforce.connection.query(SearchString);
var queryRecords = queryResults.getArray('records');
var txtOutput = ""

if (queryRecords.length > 0){

// Rows returned, so first setup the column headers (hard coded - potentially revise this)
var txtOutput = "<table class='list' width='100%' border='0' cellspacing='0' cellpadding='0'>";
txtOutput = txtOutput + "<tr class='headerRow' height=20>";
txtOutput = txtOutput + "<th nowrap>Opportunity</th>";
txtOutput = txtOutput + "<th nowrap>Stage</th>";
txtOutput = txtOutput + "<th nowrap>Role</th>";
txtOutput = txtOutput + "<th nowrap>Is Primary</th></tr>";

// Next Loop through the result array (row by row)
for (var i = 0; i < queryRecords.length; i++) {

// queryRecord = the Current row within the array
var queryRecord = queryRecords[i];

// OppRecord = the sub array row containing the linked Opportunity details
var OppRecord = queryRecord.get("Opportunity");

// Now build the results output row by row
txtOutput = txtOutput + "<tr class='dataRow' onmouseover=hiOn(this) onmouseout=hiOff(this)>";
txtOutput = txtOutput + "<td class='datacell'><a href='/"+ queryRecord.get("OpportunityId") +"' target=_parent>" + OppRecord.get("Name") + "</a></td>";
txtOutput = txtOutput + "<td> "+ OppRecord.get("StageName") + "</td>";
txtOutput = txtOutput + "<td> "+ queryRecord.get("Role") + "</td>";

// Display the standard grid checkbox image (checked or unchecked as appropriate)
if(queryRecord.get("IsPrimary")=="true"){
txtOutput = txtOutput + "<td><img src='/img/checkbox_checked.gif' alt='Checked' width='21' height='16' class='checkImg' title='Checked' /></td></tr>";} else {
txtOutput = txtOutput + "<td><img src='/img/checkbox_unchecked.gif' alt='Not Checked' width='21' height='16' class='checkImg' title='Not Checked' /></td></tr>";
} // end if (queryRecord.get("IsPrimary")=="true")
} //end of array loop

// Get rid of ugly white box by filling the gap with empty space
if (queryRecords.length == 1){
txtOutput = txtOutput + "</table>&nbsp;<br> &nbsp;<br> &nbsp;";
}
if (queryRecords.length == 2){
txtOutput = txtOutput + "</table>&nbsp;<br> &nbsp;";
}
if (queryRecords.length > 2){
txtOutput = txtOutput + "</table>";
}
} else {
// there were no rows returnd from the SOQL query - so build a message to inform the user that this contact is not related to any opportunities
txtOutput=txtOutput + "<font face = 'Verdana' size = '2'>This Contact has no specified Opportunity Contact Roles</font><br> &nbsp;<br> &nbsp;<br> &nbsp;<br> &nbsp;<br> &nbsp;<br>";
}

// Substitute the div mainBody contents for the generated HTML content
document.getElementById("mainBody").innerHTML = txtOutput;

}
catch (error)
{
}

}

</script>