• LloydS
  • NEWBIE
  • 50 Points
  • Member since 2010

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 28
    Questions
  • 40
    Replies

In a flow, I want to present the user with a multi-select checkbox field that displays a list of filtered accounts.

 

I have two custom objects - Object A and Object B. Object B has a master-detail relationship to Object A and to the standard Account object.

 

I'd like the flow to be able to create multiple Object B records - one for each of the accounts selected in the multi-select checkbox. So if Accounts A, B, and C are checked, then three Object B records are created with a master-detail relationship to those accounts as well as to Object A (which would be selected separately).

 

What is the best way of accomplishing this?

 

I don't think there is a simple solution. I could place a limit on how many accounts are selected if necessary but ideal that would not be a limitation.

  • November 06, 2012
  • Like
  • 0

I'm using the S-Drive app to store attachments on Amazon S3.

To display the attachments on the various objects (accounts, contact, cases, etc.), you need to override the standard View page with a visualforce page.

This works just perfectly for all of my objects other than accounts. On the accounts page, when using the custom VF page, my Cases related list (from the standard Case object) does not appear. Other related lists appear just fine for Accounts, and other objects display all of their related lists as well.

I can't seem to figure out what's causing this. The apex for the VF page is standard, and identical to the apex for the other objects (with the exception of naming for accounts versus contacts, cases, etc.).

The code is:

 

<apex:page standardController="Account" extensions="cg.AccountEmailExtension" tabStyle="Account">
  <apex:detail inlineEdit="true" relatedList="true" showChatter="true"/>
  <c:AttachmentComponent title="Account Files"
    customObjectName="Account" customObjectFileName="AccountFile__c"
    fileNamespacePrefix="cg__"
    relationshipName="Account__r"
    legacyIdSupport="true"
    objectId="{!Account.Id}"
    inline="true"
    defaultEmailAddress="{!defaultAccountEmail}" />
</apex:page>

 

Is there any other reason I cannot get the Cases related list to display on the page when using the above VF page? This is on a Professional version.

 

Thanks

 

 

  • October 03, 2012
  • Like
  • 0

I believe this can be done and probably best by using Apex.

 

I'd like to automatically create an opportunity automatically whenever someone responds to certain campaigns. So if someone is added to a campaign or status changed on a campaign, with a status that has been identified with the campaign as to be treated as "Responded", then go ahead and create an opportunity associated with the campaign, notify the account owner, etc.

 

Can this be done and if so I'd appreciate some guidance on what I should o.

 

Thanks.

  • March 30, 2012
  • Like
  • 0
I have a custom field on Accounts called "Client Rating". I want to update that field automatically whenever the stage on an Opportunity with the type "New Client" changes as follows:

OPPORTUNITY STAGE > ACCOUNT CLIENT RATING

ANY (e.g. when opportunity is created > Prospect
Contracting > Contracting
Opportunity Won > Client
Opportunity Lost > Former Prospect

I know I can't do this using normal workflow. I downloaded XObject from the appexchange but can't figure that out.

How do I do this?
Is there a fairly easy way to create a Page Layout in cases that will display specific sections based upon criteria such as the content of certain fields within that case? For example, I have 5 products - A, B, C, D, E, and F. I want to display sections 1 and 3 if the product is A or B. I want to display sections 2 and 4 if it's D, E, or F. I can't use Record Types because it's possible that there would be two products selected - A and D, for instance. And in that case it would need display sections for both products.
  • April 28, 2011
  • Like
  • 0

I just installed the force.com Case History application. When I click on the Case History button within a case, I get a URL no longer exists message. Any clue?

  • February 09, 2011
  • Like
  • 0

Is there a way of modifying Action Plans to include assigning a task to an object's owner? Seems like right now it can only assign to a specific user or the user creating the plan. It's important for us to be able to have one person creating plans on behalf of someone else - so owner is critical.

 

Also, can Action Plans be created via a Workflow? If not, I presume an apex trigger can be created so that a specific template is used to create an action plan based upon some pre-defined factor?

  • August 10, 2010
  • Like
  • 0

I have a simple VF page that is used to override the default view when clicking on the Cases tab. I've been using it form months but then it stopped working this morning. No error messages. No data. It just displays the "waiting to load" message. It doesn't appear to be trying to do anything and the browser indicates that the page has completed loading.

 

Any idea?

 

 

<apex:Page tabStyle="Case" >
<script src="/soap/ajax/15.0/connection.js"></script>
<script type="text/javascript" />
<script>
     window.onload = function() {

     sforce.connection.sessionId = '{!$Api.Session_ID}';

     var describeSObjectResult = sforce.connection.describeSObject("case");
     var prefix = describeSObjectResult.keyPrefix;

     var cView = "00BA0000003Nxh5";

     // Change the whole window to point to this location
     parent.document.location.href = "/" + prefix + "?fcf=" + cView ;
}
</script>
<center><h2>Please Wait ..... Loading Open Requests</h2></center>
</apex:page>

 

 

I've successfully installed Chatter TeamForce. When I try to create a folder in a Collaboration Spaces project, saving it does nothing. So i can open up the dialog to create the folder, type the folder name, but then clicking Save does nothing.
Enterprise version of SFDC and an external site using PHP. I have embedded the self-service portal on to a page using an iframe. I'd appreciate it if someone could walk me through how to automatically login the user to the SSP using their credentials for our website and avoid having to login using SSP-specific credentials. Thanks
  • April 14, 2010
  • Like
  • 0

We use an appexchange product for case handling (Email to Case Premium). E2CP in turn uses an email service to process the cases that come.

 

We have incoming emails generated by a non-SFDC connected form. The from email address is related to the server of the 3rd party service we're using for that application. The body of the email contains about 20 pieces of information including first and last name, email address, phone, and other.

 

We'd like to parse the body of the email to populate standard and custom case fields. And if the person is not already a contact, we need to make them such. How do we do this?

 

I found something in the cookbook at http://www.salesforce.com/us/developer/docs/cookbook/Content/messaging_inbound_retrieving_info.htm that seams to apply. Correct? Do I need to do anything differently because of the existing email service being used to create cases? If the referenced code is the right way of doing this, how do I identify the specific pieces of information we need.

 

For example, 

String phoneNumber = emailBody[0].substring(6);

In this case, what does emailbody[0].substring(6) referring to? Is emailBody[0] referencing the first line of the body? And so emailBody[1] would be referencing the 2nd line? What about substring?

 

Thanks.

 

  • March 17, 2010
  • Like
  • 1

I have a web-to-lead (or web-to-anything) form created. Upon submission, I'd like to ideally do the following:

 

1) If they aren't already in SFDC, create them as a lead and update various fields;

2) If they aren't a member of a specific campaign, add them to the campaign and update their status;

3) If they are a member of the campaign, update their status.

 

The basic web-to-lead form is causing me issues so I think this might have to be done with an Apex Trigger. When the current form is submitted, it works ok for someone already in SFDC. It does create a lead even though they are already in the system as either a contact or lead. But their campaign member status is updated correctly and if they aren't a member of the campaign already then they are added to it.

 

But if they are not in SFDC it doesn't work as I hoped. They are added as a lead (which is perfect)but it generates an error to the user when trying to add them to a campaign. My guess is that the way the form is setup, it's doing a lookup of the contact/lead's ID via the email address field and adding them to the campaign that way. And when the person is not already in SFDC (even though they are being added as a lead during the form submission) it can't retrieve their contact or lead ID and therefore it fails.

 

So, is this a problem best met with an Apex Trigger? 

  • March 09, 2010
  • Like
  • 0

I want to create a trigger on the Case object to enable the self-service portal when someone submits a case, they are in SFDC as a Contact or Person Account (and therefore not an anonymous submitter of a case with just their email address), and of course they haven't already been enabled for self-service portal.

 

What's the appropriate way to write the conditional statement regarding the Case submitter being a Contact or Person Account? The rest should be easy but that part is giving me some trouble. Thank you much.

  • February 28, 2010
  • Like
  • 0

I'm creating a simple trigger to update a few fields of the related account object when an opportunity is updated. I've tried a few variations but none validate correctly. Here's the current version of the trigger. Thanks in advance for the lesson.

 

 

trigger AccountBecameClient on Opportunity (after update) { Opportunity myOpportunity = trigger.new[0]; Account myAccount = myOpportunity.AccountId; if (myOpportunity.StageName == 'Closed Won' && myAccount.First_Became_Client__c == Null) { myAccount.First_Became_Client__c = date.today(); myAccount.Next_Annual_Review__c = date.today() + 365; date thisDate = date.today(); date quarterlyReview = thisDate.addMonths(3); myAccount.Next_Quarterly_Review__c = quarterlyReview; } }

 

 

 

  • February 20, 2010
  • Like
  • 0

I'm recreating a page layout in visualforce so I can make some sections dynamic based upon other field values. I've got about 10 relationship lists to display. Most are working without a problem. But there are a few that are resulting in the "not valid name" message.

 

The lists in question are: CaseComments, (Case) EmailMessages, (Case) Histories, and (Case) TeamMembers. I looked at the schema in Eclipse and took the relationship name from within Case Child Relationships. So i don't think I'm using the wrong name.

 

Anything else I could be doing wrong?

  • February 18, 2010
  • Like
  • 0

Okay I'm graduating from using triggers for simple field updates to creating a new record of a custom object. I need help getting the test class to work and the trigger as well.

 

When an opportunity is won (designated as the status being Closed Won), I want to create a new Checklist (custom object) with the required fields of the name being static text, a template ID being designated, the account referenced via the Entity lookup field, and a deadline set 10 days from today.

 

Here's the trigger so far.

 

trigger OpportunityChecklist on Opportunity (after update) { if (Trigger.new.size() == 1) { if (Trigger.old[0].StageName != 'Closed Won' && Trigger.new[0].StageName == 'Closed Won') { L5CL__Checklist__c obj = new L5CL__Checklist__c(); obj.Name = 'New Agency Orientation'; obj.L5CL__Checklist_Template__c = 'a18A0000000GvAG'; obj.L5CL__Entity__c = Trigger.new[0].AccountId; date now = date.today(); obj.L5CL__Deadline__c = now.addDays(10); insert obj; } } }

 

As for the test class, I'm not exactly sure how the system.assertequals function should be written to reference the newly created custom object record.

 

 

@isTest private class OpportunityWonChecklistTest { static testMethod void myUnitTest() { Test.startTest(); Opportunity o = new Opportunity(); o.name='NA'; o.RecordTypeId='012A0000000L9p0'; o.Type = 'Deferred Annuity'; o.StageName = 'Engage'; o.CloseDate = date.today(); insert o; o.StageName = 'Closed Won'; update o; L5CL__Checklist__c l_new = ???????; system.assertequals(l_new.Name != null, l_new.Name); Test.stopTest(); } }

 

 

Thanks for the help. This is starting to make sense.

  • February 17, 2010
  • Like
  • 0

I've written a simple Apex Trigger to change the Opportunity Type based upon the Opportunity Record Type. Works fine in the Sandbox so now it's time to deploy and I could use some help.

 

I created an outbound change set in the Sandbox and uploaded it into my Production site where it was deployed. However, it's stuck "In Progress".

 

So I created an Eclipse project and added an Apex Trigger there. But it fails in testing when i try to deploy it to the server. I've got no clue how to write a proper test for this and so far what I've found here and via Google is a bit confusing.

 

Here's the trigger code:

 

 

trigger recordtype on Opportunity (before update) { Opportunity myOpportunity = trigger.new[0]; if (myOpportunity.RecordTypeID == '012A0000000L9p0' && myOpportunity.Type <> 'New Agent or Agency') { myOpportunity.Type = 'New Agent or Agency'; } else if (myOpportunity.RecordTypeID == '012A0000000L9oW' && myOpportunity.Type <> 'Life Insurance') { myOpportunity.Type = 'Life Insurance'; } else if (myOpportunity.RecordTypeID == '012A0000000L9ol' && myOpportunity.Type <> 'Critical Illness') { myOpportunity.Type = 'Critical Illness'; } else if (myOpportunity.RecordTypeID == '012A0000000L9ov' && myOpportunity.Type <> 'Deferred Annuity') { myOpportunity.Type = 'Deferred Annuity'; } else if (myOpportunity.RecordTypeID == '012A0000000L9og' && myOpportunity.Type <> 'Disability') { myOpportunity.Type = 'Disability'; } else if (myOpportunity.RecordTypeID == '012A0000000L9ob' && myOpportunity.Type <> 'Long Term Care') { myOpportunity.Type = 'Long Term Care'; } else if (myOpportunity.RecordTypeID == '012A0000000LAzh' && myOpportunity.Type <> 'Managed Concept') { myOpportunity.Type = 'Managed Concept'; } else if (myOpportunity.RecordTypeID == '012A0000000L9oq' && myOpportunity.Type <> 'SPIA') { myOpportunity.Type = 'SPIA'; } }

 

 

 

  • February 16, 2010
  • Like
  • 0

We use an appexchange product for case handling (Email to Case Premium). E2CP in turn uses an email service to process the cases that come.

 

We have incoming emails generated by a non-SFDC connected form. The from email address is related to the server of the 3rd party service we're using for that application. The body of the email contains about 20 pieces of information including first and last name, email address, phone, and other.

 

We'd like to parse the body of the email to populate standard and custom case fields. And if the person is not already a contact, we need to make them such. How do we do this?

 

I found something in the cookbook at http://www.salesforce.com/us/developer/docs/cookbook/Content/messaging_inbound_retrieving_info.htm that seams to apply. Correct? Do I need to do anything differently because of the existing email service being used to create cases? If the referenced code is the right way of doing this, how do I identify the specific pieces of information we need.

 

For example, 

String phoneNumber = emailBody[0].substring(6);

In this case, what does emailbody[0].substring(6) referring to? Is emailBody[0] referencing the first line of the body? And so emailBody[1] would be referencing the 2nd line? What about substring?

 

Thanks.

 

  • March 17, 2010
  • Like
  • 1

I'm using the S-Drive app to store attachments on Amazon S3.

To display the attachments on the various objects (accounts, contact, cases, etc.), you need to override the standard View page with a visualforce page.

This works just perfectly for all of my objects other than accounts. On the accounts page, when using the custom VF page, my Cases related list (from the standard Case object) does not appear. Other related lists appear just fine for Accounts, and other objects display all of their related lists as well.

I can't seem to figure out what's causing this. The apex for the VF page is standard, and identical to the apex for the other objects (with the exception of naming for accounts versus contacts, cases, etc.).

The code is:

 

<apex:page standardController="Account" extensions="cg.AccountEmailExtension" tabStyle="Account">
  <apex:detail inlineEdit="true" relatedList="true" showChatter="true"/>
  <c:AttachmentComponent title="Account Files"
    customObjectName="Account" customObjectFileName="AccountFile__c"
    fileNamespacePrefix="cg__"
    relationshipName="Account__r"
    legacyIdSupport="true"
    objectId="{!Account.Id}"
    inline="true"
    defaultEmailAddress="{!defaultAccountEmail}" />
</apex:page>

 

Is there any other reason I cannot get the Cases related list to display on the page when using the above VF page? This is on a Professional version.

 

Thanks

 

 

  • October 03, 2012
  • Like
  • 0
I have a custom field on Accounts called "Client Rating". I want to update that field automatically whenever the stage on an Opportunity with the type "New Client" changes as follows:

OPPORTUNITY STAGE > ACCOUNT CLIENT RATING

ANY (e.g. when opportunity is created > Prospect
Contracting > Contracting
Opportunity Won > Client
Opportunity Lost > Former Prospect

I know I can't do this using normal workflow. I downloaded XObject from the appexchange but can't figure that out.

How do I do this?

I just installed the force.com Case History application. When I click on the Case History button within a case, I get a URL no longer exists message. Any clue?

  • February 09, 2011
  • Like
  • 0

[Coming Soon]

New Action Plans Place Template Import Listings will be here.

  • August 23, 2010
  • Like
  • 0

Anyone know anything about a namespace limit of 10?  Can't find anything in the documentation and SFDC support promised to get back to me and never did. 

  • August 17, 2010
  • Like
  • 1

I have a simple VF page that is used to override the default view when clicking on the Cases tab. I've been using it form months but then it stopped working this morning. No error messages. No data. It just displays the "waiting to load" message. It doesn't appear to be trying to do anything and the browser indicates that the page has completed loading.

 

Any idea?

 

 

<apex:Page tabStyle="Case" >
<script src="/soap/ajax/15.0/connection.js"></script>
<script type="text/javascript" />
<script>
     window.onload = function() {

     sforce.connection.sessionId = '{!$Api.Session_ID}';

     var describeSObjectResult = sforce.connection.describeSObject("case");
     var prefix = describeSObjectResult.keyPrefix;

     var cView = "00BA0000003Nxh5";

     // Change the whole window to point to this location
     parent.document.location.href = "/" + prefix + "?fcf=" + cView ;
}
</script>
<center><h2>Please Wait ..... Loading Open Requests</h2></center>
</apex:page>

 

 

Enterprise version of SFDC and an external site using PHP. I have embedded the self-service portal on to a page using an iframe. I'd appreciate it if someone could walk me through how to automatically login the user to the SSP using their credentials for our website and avoid having to login using SSP-specific credentials. Thanks
  • April 14, 2010
  • Like
  • 0

I have a web-to-lead (or web-to-anything) form created. Upon submission, I'd like to ideally do the following:

 

1) If they aren't already in SFDC, create them as a lead and update various fields;

2) If they aren't a member of a specific campaign, add them to the campaign and update their status;

3) If they are a member of the campaign, update their status.

 

The basic web-to-lead form is causing me issues so I think this might have to be done with an Apex Trigger. When the current form is submitted, it works ok for someone already in SFDC. It does create a lead even though they are already in the system as either a contact or lead. But their campaign member status is updated correctly and if they aren't a member of the campaign already then they are added to it.

 

But if they are not in SFDC it doesn't work as I hoped. They are added as a lead (which is perfect)but it generates an error to the user when trying to add them to a campaign. My guess is that the way the form is setup, it's doing a lookup of the contact/lead's ID via the email address field and adding them to the campaign that way. And when the person is not already in SFDC (even though they are being added as a lead during the form submission) it can't retrieve their contact or lead ID and therefore it fails.

 

So, is this a problem best met with an Apex Trigger? 

  • March 09, 2010
  • Like
  • 0

I'm creating a simple trigger to update a few fields of the related account object when an opportunity is updated. I've tried a few variations but none validate correctly. Here's the current version of the trigger. Thanks in advance for the lesson.

 

 

trigger AccountBecameClient on Opportunity (after update) { Opportunity myOpportunity = trigger.new[0]; Account myAccount = myOpportunity.AccountId; if (myOpportunity.StageName == 'Closed Won' && myAccount.First_Became_Client__c == Null) { myAccount.First_Became_Client__c = date.today(); myAccount.Next_Annual_Review__c = date.today() + 365; date thisDate = date.today(); date quarterlyReview = thisDate.addMonths(3); myAccount.Next_Quarterly_Review__c = quarterlyReview; } }

 

 

 

  • February 20, 2010
  • Like
  • 0

Is it possible to use a trigger to automate the creation of Campaign Member Status? For example, when a campaign of certain type is created, I would like to automatically add 'Show', 'No show' i nthe list of Campaign Member Status. Is it possible?

Thanks

Pierre