• JustD
  • NEWBIE
  • 50 Points
  • Member since 2011

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

Is there anyway to convert additional fields from leads to accounts/contact?

 

Like, lets say I wanted to put a section for both a contact email as well as an account email, could I do this and then convert them appropriately?

Hi,

 

I have developped a apex trigger on FeedItem after insert.  The purpose is to append an hashtag to the body of the post when certain criteria are met.  Everything works very well except that any mention in the body of the post becomes plain text.  Existing hashtags and the one I append are treated like hashtags.  

 

The simplified code is as follows (it appends the tag to all posts and exhibits the problem):

 

trigger FeedItemTagger on FeedItem (before insert) {

          for (FeedItem fi : trigger.new) {

                  fi.body = fi.body + ' I added this #tag in my trigger.';

                  }

          }

 

 

 

Has anyone tried something like this before?  

 

Any ideas on how to prevent the @ mentions being converted into text.

 

Thanks
Derek

  • June 25, 2013
  • Like
  • 0

Hi,

 
Tearing my hair out over this one.  I need a simple validation rule to check that a percentage field's value is <> 100%.
 

This is my rule:

Percentage_Complete__c = 100

This is the result from the debug log when the field has value of 100

20:12:51.054 (54955000)|VALIDATION_FORMULA|Percentage_Complete__c = 100|Percentage_Complete__c=100
20:12:51.054 (54963000)|VALIDATION_PASS

And when the value is 90

20:23:47.056 (56888000)|VALIDATION_FORMULA|Percentage_Complete__c = 100|Percentage_Complete__c=90
20:23:47.056 (56903000)|VALIDATION_PASS

How can it pass with both 100 and 90?

 

But if I change the rule to:

Percentage_Complete__c < 100

When the value is 100 this is the result

20:27:47.075 (75783000)|VALIDATION_FORMULA|Percentage_Complete__c < 100|Percentage_Complete__c=100
20:27:47.075 (75798000)|VALIDATION_FAIL

I get this when the value is 90

20:26:25.055 (55444000)|VALIDATION_FORMULA|Percentage_Complete__c < 100|Percentage_Complete__c=90
20:26:25.055 (55456000)|VALIDATION_FAIL

Again how can this fail with both 100 and 90?



Any help will be much appreciated.

 

Thanks
Derek

53048

  • June 06, 2013
  • Like
  • 0

Since Spring 12 I can no longer compile some Apex code that uses the QUOTE object.  In all cases this code prvisouly compiled and is deployed in production.  It just wont compile now in my sandbox.

The following two statements are real problems:

1. Creating a new Quote for testing:


Quote q = new Quote(OpportunityId=testopp1.id, PriceBook2id = pb.Id, name='Tst Quote');
insert q;

 

ERROR: Save error: Invalid constructor syntax, name=value pairs can only be used for SObjects  

2. Initialising a map using a list of Quotes


Map<Id, Quote> mapQuoteOpp = new map<Id,Quote>([SELECT OpportunityId FROM Quote where Id in :setWhatId]);

 
ERROR: Save error: Invalid initial type LIST<Quote> for MAP<Id,quote>   


Has anyone had similar problems?
Any ideas on the cause and/or solution?

Thanks

  • March 05, 2012
  • Like
  • 0

We cannot create sites as we get the following error:

 

duplicate value found: <unknown> duplicates value on record with id: <unknown>

 

which is totally unhelpful.

 

Anyone seen this error before?  i did see someone mention exactly this error (identical wording) in a post on Apex test clases but that does not seem related.

  • July 07, 2011
  • Like
  • 0

When I create a new Opportunity in Apex I would like to set the Territory for that Opportunity using the same logic as is applied when an Opportunity is created manually in the normal user interface.

 

In other words: I'd like to create and insert a new Opportunity with an Account and Owner in APEX and have its territory set exactly as Salesforce does when a user create their own Opportunities according to these rules (without having write the detailed logic to emulate this myself).  Is there any method/feature/ability in APEX/Salesforce to achieve this?

 

  • If there is a single territory that both the account and the opportunity owner belong to, the opportunity is assigned to that territory.
  • If more than one territory is common to both the account and the opportunity owner, the opportunity is not automatically assigned to any territory. The opportunity owner must manually assign a territory to the opportunity.
  • If no territory is common to both the account and the opportunity owner, the opportunity owner cannot assign the opportunity to a territory.
Thanks
Derek
  • June 03, 2011
  • Like
  • 0

Hi,

 

I have developped a apex trigger on FeedItem after insert.  The purpose is to append an hashtag to the body of the post when certain criteria are met.  Everything works very well except that any mention in the body of the post becomes plain text.  Existing hashtags and the one I append are treated like hashtags.  

 

The simplified code is as follows (it appends the tag to all posts and exhibits the problem):

 

trigger FeedItemTagger on FeedItem (before insert) {

          for (FeedItem fi : trigger.new) {

                  fi.body = fi.body + ' I added this #tag in my trigger.';

                  }

          }

 

 

 

Has anyone tried something like this before?  

 

Any ideas on how to prevent the @ mentions being converted into text.

 

Thanks
Derek

  • June 25, 2013
  • Like
  • 0

Hi,

 
Tearing my hair out over this one.  I need a simple validation rule to check that a percentage field's value is <> 100%.
 

This is my rule:

Percentage_Complete__c = 100

This is the result from the debug log when the field has value of 100

20:12:51.054 (54955000)|VALIDATION_FORMULA|Percentage_Complete__c = 100|Percentage_Complete__c=100
20:12:51.054 (54963000)|VALIDATION_PASS

And when the value is 90

20:23:47.056 (56888000)|VALIDATION_FORMULA|Percentage_Complete__c = 100|Percentage_Complete__c=90
20:23:47.056 (56903000)|VALIDATION_PASS

How can it pass with both 100 and 90?

 

But if I change the rule to:

Percentage_Complete__c < 100

When the value is 100 this is the result

20:27:47.075 (75783000)|VALIDATION_FORMULA|Percentage_Complete__c < 100|Percentage_Complete__c=100
20:27:47.075 (75798000)|VALIDATION_FAIL

I get this when the value is 90

20:26:25.055 (55444000)|VALIDATION_FORMULA|Percentage_Complete__c < 100|Percentage_Complete__c=90
20:26:25.055 (55456000)|VALIDATION_FAIL

Again how can this fail with both 100 and 90?



Any help will be much appreciated.

 

Thanks
Derek

53048

  • June 06, 2013
  • Like
  • 0

We cannot create sites as we get the following error:

 

duplicate value found: <unknown> duplicates value on record with id: <unknown>

 

which is totally unhelpful.

 

Anyone seen this error before?  i did see someone mention exactly this error (identical wording) in a post on Apex test clases but that does not seem related.

  • July 07, 2011
  • Like
  • 0

Is there anyway to convert additional fields from leads to accounts/contact?

 

Like, lets say I wanted to put a section for both a contact email as well as an account email, could I do this and then convert them appropriately?

Hello,

My office has recently downloaded the newest version of Salesforce for Outlook and unfortunately has caused several problems. It seems to download fine for Outlook 2007 but not Outlook 2010. The new version has caused several Outlooks to crash and needed to disable SalesForce for Outlook to open Outlook again. Users also can't login to Salesforce after they have downloaded the new version on to their outlook, I realize I need to enter in their security token in their Outlook but the Outlook 2010 is set up differently and I am unable to edit Salesforce options to enter in their security token. Another issue is it seems to disappear after I have downloaded it, several users open their email and Salesforce for Outlook is no longer on their Outlook. Please help!!!