• Brian12345
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 10
    Replies

I want to display content to the customer portal through a VF page.  Unfortunately, content can not be exposed through VF, only through the standard Content Objects.

 

Is it possible, however, to programmatically create a content delivery and then simply expose the content delivery link in the portal?

 

Any insight here would be appreciated!

 

Thanks,

 

B.T. 

We have what we feel is a very common use case scenario - the need to create "matches" between the attributes of records stored in two objects - think of any online "dating" service, such as FriendFinder.  For the sake of example, I will refer to the objects as Searcher and Creator.  When the attributes of a Searcher record and Creator record match, the result is stored in the match object.  Both the Searcher and Creator have a lookup relationship to this match.

Most of the time, a Searcher will match several hundred Creators and the matches are generated almost immediately (< 1 sec). However, if the Searcher has very wide criteria they will match more than 1000 Creators, which causes problems with the Apex governor limits.  As a result, we use simultaneous future calls in addition to the immediate call - in this scenario it can take 2-4 minutes to return 1300 matches.  While this delay is far from ideal, it was sufficient enough.  The user reviews the matches that are returned immediately and as they use the application the page refreshes and they can see the matches created from the completion of the future calls.  This implementation was stable.

We are now having at least three issues with this implementation:

1) Several months ago we added triggers that count the # of matches created and insert the totals into fields in the Searcher and Creator records.  These triggers are fired off at the same time that the matching occurs.  At this point, we began to receive "invalid query locator" developer exceptions related to the class that is counting the matches.  The net impact of this error is that the query was not completed, resulting in matches not being created for the Searcher.

2) In the event a Searcher edits their record and a match no longer exists with a particular Creator record, that match will be deleted.   We are now receiving errors that seem to indicate that two future calls are attempting to delete the same match.  When this error occurs, the wrong matches will be recorded for our Searchers. 

3) Another issue we are having right now is: as sometimes future calls are running simultaneously and triggers in different threads/transactions are populating the same record (Creator or Searcher), that has caused deadlocks which are unavoidable with concurrent trigger executions.

To solve for these problems, our developer changed the future calls from being simultaneous to sequential.  We implemented sequential future calls through workflow, after one future call is finished, it triggers the workflow which triggers another future call. The sequential future calls are taking 25 minutes to return all matches in the sandbox.  This is unacceptable to our users.  

As of right now we are at a standstill.  Future calls do not seem to be a good foundation for generating matches, particularly if we have additional classes / triggers tied to the execution of the code that generates the matching.  Sequential Calls create an awful user experience.  We expect matches to be returned in seconds, not 25 minutes.

We are hoping that the user community can help us vet out these issues and provide feedback as to best practices related to our business requirement.  Ultimately, we need to make a decision if Force.com is capable of supporting this requirement, or if we will need to move the logic that generates the matching to ec2, for example..

We are happy to provide code samples that will enable the community to help us solve our problems, but did not want to do so on this first post as we have several thousand lines of code and simply providing a few lines of code won't make sense.

Thanks!

B.T.

I have a business requirement to build a formula that calculate how complete the data is on a custom record and then return a corresponding image (green, yellow, red traffic lights).  

 

As part of this requirement I need to count the # of characters in a long text field.  Unfortunately, long text fields can not be used as part of a Formula, otherwise I would use len(long_text_field__c) < 100 as part of my equation.

 

Plan B is to use a trigger to count the # of characters in the long_text_field__c and insert into count_of_long_text_field__c.  Only one issue here - apex is a mystery to me.

 

While I am not a programmer, I attempted to find some javascript code online and change it to work in a trigger.  I didn't find anything simple enough that will allow me to make an honest attempt at buildling my first trigger.

 

Can someone help me get started here? 

 

 

I have a requirement to limit the # of characters displayed in an outputfield.  If the field value is > 100 characters, the displayed text should be truncated.  As shown below, I tried to use 'left' to limit the characters to 100, but I recieve the following error:

 

"Error occured trying to load the template for preview: value for outputField is not a dynamic binding!. Please try editing your markup to correct the problem."

 

Can I accomplish this in VF without using a controller? 

 

<apex:outputField value="{left(!cx.match_criteria__r.searcher__r.account.Investment_Focus__c,100)}" />  

 

Message Edited by Brian12345 on 05-12-2009 01:34 PM
Message Edited by Brian12345 on 05-12-2009 01:35 PM

I have a requirement to display tasks in the sidebar so that they are always available to users without having to keep open a second tab or return to the list view after completeting a task.   I am not able to select Tasks as a "Narrow Component".  Any suggestions on how to accomplish this?

 

Thanks! 

There are many requests on the IdeasExchange to enable roll-up fields between objects with lookup relationships.  Unfortunately, I can't wait until this functionality is released.

 

I have two slightly different needs:

 

1.) count the # of records in a one (standard object) to many relationship (custom object) and then insert the value into a field on the standard object?

 

2.) summarize a # field in many related records in a custom object and insert the total into a standard object.

  

I can only tweak code, not create it.  So does anyone have some sample code where they solved for this same need?  

 

Thanks! 

There are many requests on the IdeasExchange to enable roll-up fields between objects with lookup relationships.  Unfortunately, I can't wait until this functionality is released.

 

I have two slightly different needs:

 

1.) count the # of records in a one (standard object) to many relationship (custom object) and then insert the value into a field on the standard object?

 

2.) summarize a # field in many related records in a custom object and insert the total into a standard object.

  

I can only tweak code, not create it.  So does anyone have a code snippet where they solved for this same need?  

 

Thanks! 

We send our customer portal users a VF email template that contains links to documents and detail pages in the Customer Portal.  If a user is not already logged into the portal (which, 95% of the time, they are not), when they click the link they will be directed to www.salesforce.com to logging.  This will confuse our users....as they need to logging from our website.

 

So how can I change the default behavior of the outputlink to redirect the portal user to our homepage rather than www.salesforce.com?

 

Thanks!

 

 

 

 

The following code works if  [cx.date_match_approved__c>2009-01-10T23:59:59.000Z] is removed. 

 

When added, I am recieving an error that I need an additional ')'.  I can't undertsand why this would be the case.

 

Any ideas?

 

-----------

 

<apex:outputPanel rendered="{!AND(cx.date_match_approved__c>2009-01-10T23:59:59.000Z,cx.Status__c ='Request NDA',cx.Declined_by_Buyer__c = false)}">

 

-----------

Message Edited by Brian12345 on 02-21-2009 01:22 PM
Message Edited by Brian12345 on 02-21-2009 01:22 PM
Message Edited by Brian12345 on 02-21-2009 01:22 PM

I want to display content to the customer portal through a VF page.  Unfortunately, content can not be exposed through VF, only through the standard Content Objects.

 

Is it possible, however, to programmatically create a content delivery and then simply expose the content delivery link in the portal?

 

Any insight here would be appreciated!

 

Thanks,

 

B.T. 

I have a business requirement to build a formula that calculate how complete the data is on a custom record and then return a corresponding image (green, yellow, red traffic lights).  

 

As part of this requirement I need to count the # of characters in a long text field.  Unfortunately, long text fields can not be used as part of a Formula, otherwise I would use len(long_text_field__c) < 100 as part of my equation.

 

Plan B is to use a trigger to count the # of characters in the long_text_field__c and insert into count_of_long_text_field__c.  Only one issue here - apex is a mystery to me.

 

While I am not a programmer, I attempted to find some javascript code online and change it to work in a trigger.  I didn't find anything simple enough that will allow me to make an honest attempt at buildling my first trigger.

 

Can someone help me get started here? 

 

 

I have a requirement to limit the # of characters displayed in an outputfield.  If the field value is > 100 characters, the displayed text should be truncated.  As shown below, I tried to use 'left' to limit the characters to 100, but I recieve the following error:

 

"Error occured trying to load the template for preview: value for outputField is not a dynamic binding!. Please try editing your markup to correct the problem."

 

Can I accomplish this in VF without using a controller? 

 

<apex:outputField value="{left(!cx.match_criteria__r.searcher__r.account.Investment_Focus__c,100)}" />  

 

Message Edited by Brian12345 on 05-12-2009 01:34 PM
Message Edited by Brian12345 on 05-12-2009 01:35 PM

Hi,

 

I need to set a workflow in salesforce to send email alert. But, email body has to differ according to values in contacts. Basically, I need to substitute certains values based on conditions in contacts ( its not direct substitutions like {!Contact.FirstName} ). It will be based on conditions in values stored in contacts. For example, if {!Contact.AField} == "atypicalvalue" then substitute "something" else substitute "some other value".When I analyzed, there will be 64 possible types of emails. But, making 64 email templates doesn't look logical.

 

Is there any easy method to do it?

 

Please help!

 

 

I want a check box if the IsActive Value is true than have a check and if it is false have it be not checked as a field on the contact layout page.  I basically want an easy way to see from the contact level of who is or is not a self service user. 

Can anyone give me assistance in what direction to go to deliver this functionality?

Thanks,


Renee

The following code works if  [cx.date_match_approved__c>2009-01-10T23:59:59.000Z] is removed. 

 

When added, I am recieving an error that I need an additional ')'.  I can't undertsand why this would be the case.

 

Any ideas?

 

-----------

 

<apex:outputPanel rendered="{!AND(cx.date_match_approved__c>2009-01-10T23:59:59.000Z,cx.Status__c ='Request NDA',cx.Declined_by_Buyer__c = false)}">

 

-----------

Message Edited by Brian12345 on 02-21-2009 01:22 PM
Message Edited by Brian12345 on 02-21-2009 01:22 PM
Message Edited by Brian12345 on 02-21-2009 01:22 PM

I have a workflow rule that fires a time-based action (an email alert and field update) and this rule has been working fine, firing as expected thousands of times over the past couple of months since I created it.  This morning however, the workflow rule was due to fire on 4 records and bombed out (did not fire) on each of them.  I received four similarly worded email messages:

 

Subject: Salesforce workflow could not perform a pending action

Details:
Object Type: Drip Event

Record: DripEvent-014794
https://na2.salesforce.com/a0E40000001KG3S

Workflow Rules attempted: Healthy Kids Campaign Email Series 2
https://na2.salesforce.com/01Q40000000FMKj

Workflow Actions attempted: Healthy Kids Campaign Email Series 2
https://na2.salesforce.com/01W40000000D09T
Mark Send Completed
https://na2.salesforce.com/04Y400000000CgI

 

 

I experienced issues with time-based workflow when daylight savings time hit this past fall and the guidance from Salesforce  was to completely rebuild all of my workflow rules (which didn't correct the problem by the way, my workflow rules were still trying to send at 11:00pm the night before they were supposed to, and failing to fire).  My question -- is there a known issue with time-based workflow rules following the Spring '09 release?  I've looked over my workflow rule a dozen times today and nothing at all has changed in our Salesforce instance relating to this rule.

 

Thanks much!

Dave