• Rick_NookInd
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 25
    Questions
  • 44
    Replies

 

Anyone have any idea what the actual limit is (and will be) for "Force.com - One App" and "Chatter Only" licenses?  As far as I can tell it is NEITHER read access NOR read/write access to 10 custom objects per "Profile".  I can select as many as I want.  So I'm unsure if it is broken, I don't understand it, or somehow it is enforced thru use or something?  It is really hard to justify recommending buying platform licenses to use 11 objects when it is neither clear nor apparently enforced what the actual limit is.

 

According to the documentation(SF Help):

"Force.com - Free" in Administration Setup/Company Profile/Company Information"; Force.com - One App in Help file - "They are limited to the use of one custom app, which is defined as up to 10 custom objects, and they are limited to read-only access to the Accounts and Contacts objects

 

"Chatter Only" in both places - "Modify up to ten custom objects" and "View Salesforce accounts and contacts"

 

Using count():

Integer totalShipments = [SELECT count() FROM Invoice_Detail__c WHERE Invoice__r.Invoice_Type__c = 'SHP'];

produces (as expected as this code was from before aggregate queries)

System.LimitException: Too many query rows: 50001

 

Using AggregateResult:

Integer totalShipments = 0;
List<AggregateResult> groupedResults = [SELECT COUNT(Id) theCount FROM Invoice_Detail__c WHERE Invoice__r.Invoice_Type__c = 'SHP'];
for (AggregateResult ar : groupedResults) {
totalShipments = Integer.valueOf(ar.get('theCount'));
}

produces (not as expected)

System.LimitException: Too many query rows: 50001

LIMIT_USAGE_FOR_NS Number of query rows: 52493 out of 50000 ******* CLOSE TO LIMIT

 

So apparently even though Oracle is quite capable of efficiently producing a summary aggregate result without providing the details and I imagine an ambitious programmer could compose such a SQL query despite having to generate it from a SOQL aggregate query to fit the internal SF complex multi-tenant schema, we are being charged for each row included in the aggregate calculation instead of just the single aggregate row returned.

 

Is there any workaround other than perhaps calculating this client side with javascript in a visualforce page (and being charged 1 API transaction per 2000).   I imagine it would be quite slow to do 25+ sequential API transactions on a button click.

 

I'm trying to place a company metric in a dashboard from a visualforce page with a custom controller.  Yet I seem unable to make this simple calculation.  I can't use Batch Apex to pre-calculate as eventually there will varying filter criteria such as date ranges that quite reasonably could include "for all time".

Hey guys,

 

I wrote this document hoping I can get someone to listen at DreamForce this year.  I wanted to place it someplace people will be able to easily find so I'm putting it here.  Document pasted below.

 

Rick

 

Force.com Flaws by Richard Bergen at Nook Industries in Cleveland Ohio on Decemeber 2010

 

I was asked to gather my thoughts so that at our third DreamForce perhaps we can get the right people the right information so they can make Force.com a more viable and robust platform option.  We’re moving everything to Force.com due to all the benefits, and we have all our employees as users.  So to speak I’ve drunk the Kool-Aid, and now I’m just hoping it wasn’t poison.   As I thought others might benefit from this information gained from pounding my head against a brick wall for three years, I’m sharing it.  Here’s the shortened list:

 

Workflows are fundamentally flawed in so much that any “Field Update” puts data and process consistency at risk due to the “workflows don’t trigger other workflows” hack that was employed to avoid infinite loops.  Workflows should always fire when their conditions are met!   This is particularly problematic in time based workflows because actual actions are being taken inappropriately.  Also, this completely blocks multi-stage business processes being implemented via workflows.

 

Picklists should be able to be dynamic from both an external source or a custom object.  There shouldn’t be a limit to the number of picklist values.  Lookup relationships should be able to be conditional and dependent, e.g. select a contact on an opportunity but only those contacts for the account specified by the opportunity.  In fact, it should be possible for the lookup relationship UI to appear similar to a picklist so the user won’t need to search to select something if there aren’t many options to select from.

 

Salesforce.com bypasses triggers sometimes in certain known (a help page lists them) and unknown circumstances such as some of their specialized standard object pages, e.g. contact email update page.  The whole idea of a trigger is that it is always triggered.  If I want a trigger to do nothing in certain circumstances, I would code it (or them all) to do so.

Force.com seems to lack concurrency control between separate transactions performed by the same user, e.g. API, Scheduled Apex, Batch Apex, or even multiple UI.  This is easily demonstrated by opening up the same record twice in standard UI.

 

"A batch Apex job that contains 1,000 records is considered five transactions of 200 records each."  What about when it is only acceptable if it is committed / rolled back as a single transaction?

 

Apex triggers cannot do synchronous web callouts.  That means we can’t do perfect real time synchronization or validation.

 

Although Force.com performs well when interacting with data that is two or three related objects deep, it performs very poorly in all areas with chains of three or more relations or in N-to-N relationships.  This is evident in extreme (and sometimes in not so extreme) cases via reaching governor limits, lack of ability to display on the object detail view page of a related list “once removed” (e.g. to display N-to-N appropriately), lack of conditional aggregate data sometimes being easily gathered, lack of ability to query deep enough or appropriately in SOQL, etc.  Note that master/child relationship efforts do not address this in any way because they are often unusable due to the forced cascade deletion of child objects.

 

There are some odd actions that are performed with regard to child record summary rollup fields.  They are actually updating the parent record when the child record is updated.  Conceptually, they “should” act like a “formula that references another record”.   An update to the child is not an update to the parent.  The parent just has a different value for its formula, i.e. summary rollup.  The fact that this update actually kicks users off the parent record if they are editing it makes summary rollup fields often unusable.

 

There are many more issues, concerns, and roadblocks that prevent Force.com from being a viable solution for us in many cases.  Although the concept behind Force.com is a step forward with regard to Platform as a Service, it still has a lot of needed work to be done.  Otherwise, wouldn’t Salesforce Standard Objects have been coded using it by now?

Winter 2010 was supposed to be released with advanced search at the top of the screen without having to click on the advanced search link.  It was released, but it's not an advanced search.  It's some "starts with" keyword search from a limited set of fields, i.e. not all the fields an advanced search... or even a basic search is supposed to query!  Fix or rollback immediately please!  We can't even pull up an account knowing it's account number!

 

Here's my full complaints:

 

First of all, global search is not searching the correct fields that an advanced search is supposed to search, i.e. custom fields of type text, Account Number on Account, and god knows what else is missing.  It's bad enough we have to consider going unlimited to add tabs and therefore objects to search, but now we can't even search the necessary fields?  Also, it is matching incorrectly with find duplicates on leads and lead conversion.  This already has caused us duplicate accounts and duplicate opportunities and we've been at work here using Winter 2010 only a few hours.  I've tried using a manually constructed link to get to the old advanced search.  It does not work so I guess fundamentally the searching both use is broken.

 

Second, right now search is broken.  Here's the array of error messages I get doing the exact same search:

#1) The search functionality is temporarily unavailable.   Customer Support is aware of the situation and we are working to restore the search functionality as soon as possible. Please try again in a couple of minutes.

 

#2) No matches found Your search results are not optimized. If these results are not what you expected, please try again later.

 

#3 (Returning wrong results due to first issue) Your search results are not optimized. If these results are not what you expected, please try again later.

 

Every time error #2 occurs, a duplicate is likely created.  Not good!

 

Third, I'm noticing performance problems where searches/queries are taking like 15 seconds or more.

I've having trouble determining the combination of circumstances that are causing triggers cumulatively to exceed the 20 SOQL query governor limit.

 

I can't get a Debug Log for these because I can only request 20 debug logs at a time, and I do tens of thousands of transactions.  So I have no way of determining what combination of triggers and circumstances are causing the governor limit to be exceeded.  Furthermore, I can't even build my own debug log because database transactions and emails are rolled back when the governor limit is exceeded.

 

I have seventy some triggers on a dozen or so related objects.  A good portion of those potentially may need to make a SOQL query under certain circumstances.  A good portion may need to do a DML operation under certain circumstances.  They all work in batch, and if the circumstances don't seem to require the query or the DML I'm pretty good about not doing one to stay under the limit.

 

They are triggered by each of tens of thousands of transactions a day.  Maybe one or two of those exceed the governor limit even with a batch size of 1 for a certain object.  Many do with a batch size of 200.

 

I can log what data is being upserted, but I don't know necessarily know the exact state of the database in other objects or what triggers were fired because of these related records.  For example, I can know I posted a primary CSR to a quote, but I don't know that the primary CSR is changed, that it doesn't match the opportunity owner, or that the related order was priorly given credit to someone else.

 

Ideas?

I found a way that apparently works to "stretch" the limit of 20 SOQL queries in a transaction/triggers.  Could I get some expert commentary on whether this technique is reliable?  In other words, is every formula field always calculated, queried, update to date, and available when the before insert/update trigger is run?

 

Basically, instead of doing a SOQL query in a before insert/update trigger, I created a formula field that is supposed to have that exact same data.

 

Here's an example:

 

NEW CODE:

 

Opportunity.Account_Number__c is a formula field with the formula "Account.AccountNumber"

 

trigger Opportunity_Prevent_Corporate_HQ_Customer on Opportunity (before insert, before update) {
 for (Opportunity opp : trigger.new) {
  if (opp.Account_Number__c != null) {
   if (opp.Account_Number__c.startsWith('CORP')) {
    opp.addError('Invalid account on opportunity.  Corporate HQ accounts may not have opportunities, quotes, orders, or invoices against them.');
   }
  }
 }

}

 

OLD CODE:

trigger Opportunity_Prevent_Corporate_HQ_Customer on Opportunity (before insert, before update) {
 List<String> theIds = new List<String>();
 for (Opportunity opp : trigger.new) {
  theIds.add(opp.AccountId);
 }
 Map<Id, String> acc_map = new Map<Id,String>();
 List<Account> acc_list = [SELECT Id,AccountNumber FROM Account WHERE Id IN :theIds]; 
 for (Account acc : acc_list) {
  acc_map.put(acc.Id,acc.AccountNumber); 
 }
 for (Opportunity opp : trigger.new) {
  if (acc_map.containsKey(opp.AccountId)) {
   if (acc_map.get(opp.AccountId) != null) {
    if (acc_map.get(opp.AccountId).startsWith('CORP')) {
     opp.addError('Invalid account on opportunity.  Corporate HQ accounts may not have opportunities, quotes, orders, or invoices against them.');
    }
   }
  }
 }
}

 

 

 

And, before someone says "you shouldn't need to do 20 queries if you coded in properly", allow me to point out that I have 13 separate triggers on Opportunity and it's child objects and that they need access to a dozen different objects in various contexts.  When a batch gets posted that triggers enough of the code of the various triggers, there is just a lot of different data to pull, e.g. Account info, User info, Task info, related custom object info, queries for update, etc.

 

I'm also aware that the example given might be better done with a validation rule, but it was a simplest example I could find that clearly demonstrates the technique I am inquiring about.

My boss and I are trying to brainstorm up how we could "in effect" relate "Content" objects in a many to many relationship.  I have to do this or I'll have to end up developing document management from scratch instead of using "Content".

 

You can't actually do it because you can't have a Lookup to a Content object (or a Document) in a junction object or apparently in any object.  You can't do it "in effect" in one multi-select picklist (populated via Metadata API) because there is a limit to 150 pick list entries per multi-select picklist.

 

Here's what we are thinking and I'd like to get your input or other suggestions:

 

We create a custom formula with HYPERLINK that somehow gets to a visualforce edit page passing in the Id (since you can't alter the layout as far as I can tell).

 

On that visualforce page we have a number of multi-select picklists which we dynamically populate with 150 document control numbers each with a custom controller (is this possible?).  Then in the custom controller we concatenate the document control numbers and save them as a comma separated string.  The controller would also have to parse the string to initially populate which items are selected in the multi-select picklists.

 

Any comments on the overall idea? Do you think this would work?

Could I get confirmation from someone who fully understands the limitations of Scheduled Apex before I consider emailing the product manager some constructive criticism? 

 

Is does not appear to be possible to schedule a single apex job faster than once per hour based on the following error message:

 

System.StringException: Seconds and minutes must be specified as integers: 0 0,15,30,45 * * * ?

and this:

 

from Apex Developers Guide

Seconds 0–59 None
Minutes 0–59 None

Hours 0–23 , - * /

 

I realize there is worry about load on SalesForce servers, but c'mon.  I also realize I could do this with 2 or 4 jobs, but thats a hack and we only get 10 total.

 

The UI is also crippled.  I can't seem to even schedule hourly through it.  Also, it is forcing me to specify an end date when I can't imagine ever wanting a reoccuring job to not just continue until stopped.

"The new Force.com IDE for Spring '10 will be released shortly after the Spring '10 server upgrade cycle has completed."

(http://wiki.developerforce.com/index.php/Force.com_IDE)

 

But is there a Developer Preview version available?  I'd like to create a trigger at the new API level so it can do a summary calculation and then update another object, and I believe the only way to create a trigger is through Eclipse.

I've had users report that the probability percent is not auto-populating in opportunity when you select a stage in Spring 10 Release.

 

It appears there are Javascript errors on page load thus preventing Javascript from populating the probability percent upon stage select box option selection. 

 

It looks like Opportunity Edit is not working in IE7 and is working in Firefox 2 and IE8.  I don't know about Safari or IE6.

 

Spring 10 was released on my instance Friday, and my time-based workflows have been failing since.  I came in this morning to 300 emails stating which ones failed and an "Error Number" but no error message.  I have already opened a case, but it'll be days (and hundreds more records to fix) before Tier II gets back to me.  Anyone have any time-based workflows working who is using Spring 10 release?  Any SF Employee want to translate that error number into an error message for me please? Any ideas?

 

Email Subject: Salesforce.com workflow could not perform a pending action

Details:
Object Type: Opportunity
Record: XXXXXXXXXXXXXXXX-BS-121997

Workflow Rules attempted: Create Task: Follow Up or Adjust Close Date

Workflow Actions attempted: Follow Up or Adjust Close Date

Error Number: 1991919676-60 (1275087062)
Date: 8 Feb 2010 05:01:15 GMT

I've been trying out the aggregate functions to see how useful it will be, and I ran into an error message that concerns me. System.Exception: field 'Subject' can not be grouped in a query call Here's the code: AggregateResult[] r_array = [SELECT Subject,Count(Id) FROM Task GROUP BY Subject]; for(AggregateResult r : r_array) { System.debug(r); }
We don't have a public database, but we do have a forum. Anyone else going through the process of testing the Spring 2010 release to see if any of the SalesForce bugs are fixed, lets save each other some redundant effort and try to post results here.

I'd like to encourage everyone to promote the following (old) idea so it gets the Product Manager attention it deserves:

 

https://sites.secure.force.com/ideaexchange/ideaView?c=09a30000000D9xt&id=08730000000BrrCAAS

 

Workflows are such a great feature, but they are so horribly problematic due to the lack of this "idea" being implemented, i.e. that Workflows should trigger other Workflows.

 

Any workflow that ever does a "Field Update" puts the organization at risk for existing and future time-based workflows to misfire and normal workflows to not fire if there are ever conditions based on the field updated, which results in problems ranging from malfunction to data integrity loss requiring repair.

 

Essentially, the only "safe" workaround is to NEVER do a "Field Update" with a workflow, which means using Apex triggers instead of workflows, i.e. Code not Clicks.  Thats usually not practical so unless everyone reviews every other workflow's conditions before creating a new workflow with a field update they possibly will be breaking other workflows and it's completely unobvious.  It's just a mess.

 

I brought this up at DreamForce at the first question the Meet the Developers session.  Here's the audio:

http://www.salesforce.com/video/dreamforce-sessions09-backstagepass.jsp

 

The excuse why it isn't implemented is that it causes infinate loops, and if you believe them supposedly it's on the roadmap to "do something about" in the perhaps in the next year.  Odds are unless more vote on the idea, workflows will continue to just silently malfunction for those who don't understand, and those who do will be forced into much more complicated workarounds such as Apex triggers.

I'd like the "Last Modified By" on a record to show as a person instead of an integration user.  This is a good idea in general, and with Chatter coming out it'll even be a better idea.  Here's some brainstorming on how, and I'm hoping someone has some ideas either new or how to make these existing ideas below to work.

 

Pass in the user for each record somehow when doing an API upsert

Is it possible though API to post a record update as a specific user?  I remember reading somewhere that you could have something like this enabled on your salesforce org for initial data loads to specify "Created By".  Perhaps whatever that is could be permanently enabled?

 

Pipe in the changes to a custom object via API and then somehow use Apex (or Workflow) to post them to the real object as the person user

Is there any way to post a transaction in Apex as a specific user?  I looked at using runAs but apparently thats only for test methods.

 

Do API upsert with the user's actual username, password, and token

But if I manually gather these passwords, how do I block users from changing their password/token; or alternatively retrieve them reliably via Apex or API with a System Administrator user?

 

I'm suspecting there isn't really a good workaround, but I wanted to ask the forum before giving up.  Thanks in advance for any input.

There is a special contact email edit screen that only appears in certain circumstances. For example, in a salesforce send email screen, you try to send an email to a contact ("To:") that has no email address on its record and then click on the link that appears below the error message, enter the email on the edit screen, and hit one of the save buttons.  I'm told it also may appear in certain bounced email situations.

 

This edit screen apparently bypasses the After Update Trigger on Contact!  As you might imagine, a contact record being updated without a contact record update trigger being fired might be a problem.

 

Could I get confirmation that others are experiencing this same behavior on their org and agreement that indeed contact edit screens even special one-field edit screens should always fire an after update trigger when saving the record and therefore it's a bug?

 

Getting SalesForce support to admit to a bug in my experiences is always like pulling teeth.  When they say it isn't a bug, I'd like to be able to say the developer forums agree that after update triggers should fire when a record is updated.  When they say it's my fault, I'd also like to be able to say we agree that since the trigger isn't being executed at all in those circumstances, it can't be an Apex coding error in my trigger.

 

I can't seem to find the daily limits on Batch Apex in the documentation anymore.  Is there no longer a limit or am I just not finding it?

 

I skimmed everything I could find and all I can find is 2000 @future method calls per user license per day in a forum post.  Does that still apply to @future?

 

I'm doing some testing whether it is safe to put the more critical of our medium sized business data on SalesForce, and quite unexpectedly a test seems to have revealed a data integrity issue.

 

If you open up an edit screen on a record and then in some other way modify the same record with the same user perhaps even a second edit screen (or trigger/API/visualforce page), the original edit screen does NOT give you the traditional error message "The record you were editing was modified by _(you)_ during your edit session." when you hit save.

 

As with any data integrity issue, couldn't this be a disaster in the making?

 

For example, lets say one tracks their inventory with SalesForce, which is one of many things we are planning.  If I allocate inventory directly or indirectly in one way while I happen to have a part edit screen up perhaps to change the standard cost of the part but not change the inventory level, I just accidentally removed the previous decrement to the inventory level on the part record.

 

Am I the first to detect such?  Can I get some agreement that it is indeed a bug and not safe for mission critical data on SalesForce.com servers if there are standard UI edit screens for those custom objects?  I mean if all it takes is the same user to open the same record twice for data loss to occur, how could it be safe?

 

All I can think of is disable inline editing and to not use any of the standard SalesForce edit pages ever and replace them with VisualForce pages with Custom Controllers to detect and appropriate error out in those circumstances, but that seems like a LOT of extra effort, maintenance, loss of functionality, and perhaps exceeding some salesforce limit unnecessarily.

 

Thoughts?  Comments?  Suggestions?  Anyone know a Product Manager who might be interested in fixing this design problem in one of their teams?

 

Is anyone else concerned that there may be data loss?

I'd like to make an App native, but I believe if I do so companies may exceed limits when they use it. For example I need to maintain two complete lists of every salesforce id mapped to an external id. Just that two tables could take up as much as 2/3 of their storage allocation since storage space is calculated by the number of records exclusively. Is there any arrangement SalesForce makes with Partners such that the Partner can pay for companies that install their app to have increased limits, somehow absorb some of the resources to the Partner, or have Partner created and installed things not count at all towards limits?

I'm trying to populate a lookup to Account in Account called Parent_or_Self_Id__c, but it generates an error when I set a record to reference itself:

Hierarchy Constraint Violation in the UI

or

CIRCULAR_DEPENDENCY, attempt to violate hierarchy constraints in Apex

 

From a Data Model and a practical perspective it's much preferred to have one lookup field than potentially sixty-five cross object formulas (if that's even allowed) to pull the data from the parent record defaulting with the current record.

 

Anyone know if the apparent check restricting circular references in the data can be disabled by the SalesForce feature activation customer support?  I called a different area of customer support and the person seemed to be under the assumption that it couldn't be changed without any reasoning why.

 

Perhaps the validation rule was created by a salesforce developer over-protecting the system so he could guarantee no infinate loops ever?  In theory poorly coded Apex especially triggers could be following lookups in the data and get lost in an infinate loop.  But in practice, if that happened it would violate a governor rule, and generate an API error with no harm.   I can't think of any other reason to restrict data from having circular references.  Perhaps there is more reasoning to this restriction that I'm not aware of?

 

I keep running into all of these different ways that SalesForce is crippled... perhaps one per month!  So disappointing!  Another item to add to the list of technical flaws in SalesForce that maybe I can get someone to listen to at the next DreamForce?  SalesForce may be one of the least flawed Content Management Systems (CMS), but that's why experienced people often caution against CMS instead of custom programming because of those things you need done that can't be done!

 

Winter 2010 was supposed to be released with advanced search at the top of the screen without having to click on the advanced search link.  It was released, but it's not an advanced search.  It's some "starts with" keyword search from a limited set of fields, i.e. not all the fields an advanced search... or even a basic search is supposed to query!  Fix or rollback immediately please!  We can't even pull up an account knowing it's account number!

 

Here's my full complaints:

 

First of all, global search is not searching the correct fields that an advanced search is supposed to search, i.e. custom fields of type text, Account Number on Account, and god knows what else is missing.  It's bad enough we have to consider going unlimited to add tabs and therefore objects to search, but now we can't even search the necessary fields?  Also, it is matching incorrectly with find duplicates on leads and lead conversion.  This already has caused us duplicate accounts and duplicate opportunities and we've been at work here using Winter 2010 only a few hours.  I've tried using a manually constructed link to get to the old advanced search.  It does not work so I guess fundamentally the searching both use is broken.

 

Second, right now search is broken.  Here's the array of error messages I get doing the exact same search:

#1) The search functionality is temporarily unavailable.   Customer Support is aware of the situation and we are working to restore the search functionality as soon as possible. Please try again in a couple of minutes.

 

#2) No matches found Your search results are not optimized. If these results are not what you expected, please try again later.

 

#3 (Returning wrong results due to first issue) Your search results are not optimized. If these results are not what you expected, please try again later.

 

Every time error #2 occurs, a duplicate is likely created.  Not good!

 

Third, I'm noticing performance problems where searches/queries are taking like 15 seconds or more.

Hello,

 

   I am actually a .net developer but I am going to self study SalesForce and I need to pass the 401 developer exam. Can you please tell me what and from where I should study? and provide me with any dumps and samples questions please?

 

Thanks,

   sally

I've having trouble determining the combination of circumstances that are causing triggers cumulatively to exceed the 20 SOQL query governor limit.

 

I can't get a Debug Log for these because I can only request 20 debug logs at a time, and I do tens of thousands of transactions.  So I have no way of determining what combination of triggers and circumstances are causing the governor limit to be exceeded.  Furthermore, I can't even build my own debug log because database transactions and emails are rolled back when the governor limit is exceeded.

 

I have seventy some triggers on a dozen or so related objects.  A good portion of those potentially may need to make a SOQL query under certain circumstances.  A good portion may need to do a DML operation under certain circumstances.  They all work in batch, and if the circumstances don't seem to require the query or the DML I'm pretty good about not doing one to stay under the limit.

 

They are triggered by each of tens of thousands of transactions a day.  Maybe one or two of those exceed the governor limit even with a batch size of 1 for a certain object.  Many do with a batch size of 200.

 

I can log what data is being upserted, but I don't know necessarily know the exact state of the database in other objects or what triggers were fired because of these related records.  For example, I can know I posted a primary CSR to a quote, but I don't know that the primary CSR is changed, that it doesn't match the opportunity owner, or that the related order was priorly given credit to someone else.

 

Ideas?

Hi,

 

We have some triggers on some object X, and then there are a couple Field Update Workflows on the same object that run after the triggers. These Workflows cause the same triggers to fire again because they update object X (as a result of Field Update). What I want to do is prevent this from happening. Is there a way to queue triggers to run after Workflows? An alternative method is perhaps using an intermediary static class to keep track of the triggers that have already run, but then I don't know if this class can keep its state after the Workflows start running.

 

Any help is appreciated!!

  • August 03, 2010
  • Like
  • 0

Hey Guys,

 

Here is an interesting one for you.  I have dug through the documentation and cant find a limitation documented anywhere so I'm now thinking its an undocumented feature???

 

 

Apex Scheduler triggers a batch that simply runs an update over a subset of Leads at 5am each morning.  The batch runs perfectly and updates a number of complex status fields as defined by some related objects.  Its really just a workaround for not being able to use a master detail.  Where the problem lies is that there are a number of small conditions that should fire an email to the Lead via workflow, all of these are configured and working if i perform an update through the front end, however, when the batch runs no emails are produced.

 

So, enforced limitation, undocumented feature or bug?

 

Cheers,

 

Hi,

How do you send an email notification from Apex code? Please advice.

 

thanks

 

  • August 02, 2010
  • Like
  • 0

With the Summer'10 release, the Report Builder also is able to edit Summary Reports. During June, we added Boolean filtering and conditional highlighting. As of June 28th, this excludes Matrix reports, and the ability to edit charts. Both of these should be added before September 2010.

I'm particularly interested in:

1) browser compatibility (for instance, we have found and corrected a set of look and feel bugs for IE6)

2) load time and feedback (where we have spent a lot of time optimizing for load-time performance, but still have some work to do on the treeview load time)

3) How you feel about interacting with the builder?

 

We are really shooting for feature parity with the wizard (i.e.. the Builder create or edit everything the builder can) over the next 2 months and for GA  (in Winter'11), but also we want to know requested changes - here, or on IdeaExchange.

 

Tom Tobin

  • June 28, 2010
  • Like
  • 0

We have two custom objects, say object A and object B. Object A has a before update trigger. The trigger does the following

 

a) Query object B records

b) Perform some business logic

c) Update object B records.

 

Assume, there are 10 records being updated in object A. Since there is a before update trigger, the trigger fires and runs for all the ten records.  Also, please keep in mind that as trigger executes for those 10 records, the records in object B are updated using an update DML statement. Currently, the updates to custom object B is a bulk update ( i.e. it creates a list of object B instances with new values, and runs the update DML finally on the list of Object B's ) During this process of execution ( i.e. trigger for 10 records has not completed its execution) , assume another 15 records are updated in object A. Now my doubt is, would this trigger execution ( 15 records execution flow)  see the updated values of object B during step a)  of the trigger mentioned above ? The key to the use case is that, these 15 records need to see the updated values of object B.

 

Also, if I do update on object B for every record, instead of doing it finally, would that help so that when the 15 records ( object A update ) come in they see updated values of object B in step a) ? I understand that there is a potential chance of hitting the governer limit here. Has anyone faced a situation like this before? Are there better alternatives or suggestions to handle this? Thanks a lot in advance for your help and suggestions.

Could I get confirmation from someone who fully understands the limitations of Scheduled Apex before I consider emailing the product manager some constructive criticism? 

 

Is does not appear to be possible to schedule a single apex job faster than once per hour based on the following error message:

 

System.StringException: Seconds and minutes must be specified as integers: 0 0,15,30,45 * * * ?

and this:

 

from Apex Developers Guide

Seconds 0–59 None
Minutes 0–59 None

Hours 0–23 , - * /

 

I realize there is worry about load on SalesForce servers, but c'mon.  I also realize I could do this with 2 or 4 jobs, but thats a hack and we only get 10 total.

 

The UI is also crippled.  I can't seem to even schedule hourly through it.  Also, it is forcing me to specify an end date when I can't imagine ever wanting a reoccuring job to not just continue until stopped.

Is there any way to change or delete a Scheduled Job ?  I am able to create one easily enough, but once it is made I can only look at the values in the CronTrigger object, but not update them.  Also, it seems I cannot delete them.  I also looked at the System.AbortJob method, but that seems to only stop a job that is already running - I get an error if I try it on a Queued job.

 

The reason I am doing this is to try to create a 'sliding' job.  So, when a trigger is fired the job will run in 5 minutes.  But if the trigger is fired again before that 5 minutes is up, it will find the old job and either delete it and make a new one for 5 minutes out, or update the old one so the next scheduled time is in 5 minutes.

 

Any ideas are welcome!

 

Jason

 

 

I need to write a trigger on Task so that it fires only for the records that are created in the UI.

For the records that get created through Outlook etc. I want to bypass the trigger. 

 

Hw to achieve that logic. Is there any way to identify the records created from API or from UI?

 

Pls let me know ASAP.. Thnx

I've had users report that the probability percent is not auto-populating in opportunity when you select a stage in Spring 10 Release.

 

It appears there are Javascript errors on page load thus preventing Javascript from populating the probability percent upon stage select box option selection. 

 

It looks like Opportunity Edit is not working in IE7 and is working in Firefox 2 and IE8.  I don't know about Safari or IE6.

 

The Spring 10 is support rich text...great! but can anyone give me some hints on how to access the field?

 

The application I am working on needs to read out the content and convert it to a PDF..

 

Is the content of the rich text field stored as HTML format? How about the inserted image? How to access them? I can't find any documents so far:-(

 

 

 

  • February 08, 2010
  • Like
  • 0

Spring 10 was released on my instance Friday, and my time-based workflows have been failing since.  I came in this morning to 300 emails stating which ones failed and an "Error Number" but no error message.  I have already opened a case, but it'll be days (and hundreds more records to fix) before Tier II gets back to me.  Anyone have any time-based workflows working who is using Spring 10 release?  Any SF Employee want to translate that error number into an error message for me please? Any ideas?

 

Email Subject: Salesforce.com workflow could not perform a pending action

Details:
Object Type: Opportunity
Record: XXXXXXXXXXXXXXXX-BS-121997

Workflow Rules attempted: Create Task: Follow Up or Adjust Close Date

Workflow Actions attempted: Follow Up or Adjust Close Date

Error Number: 1991919676-60 (1275087062)
Date: 8 Feb 2010 05:01:15 GMT

I've been trying out the aggregate functions to see how useful it will be, and I ran into an error message that concerns me. System.Exception: field 'Subject' can not be grouped in a query call Here's the code: AggregateResult[] r_array = [SELECT Subject,Count(Id) FROM Task GROUP BY Subject]; for(AggregateResult r : r_array) { System.debug(r); }

I'm trying to populate a lookup to Account in Account called Parent_or_Self_Id__c, but it generates an error when I set a record to reference itself:

Hierarchy Constraint Violation in the UI

or

CIRCULAR_DEPENDENCY, attempt to violate hierarchy constraints in Apex

 

From a Data Model and a practical perspective it's much preferred to have one lookup field than potentially sixty-five cross object formulas (if that's even allowed) to pull the data from the parent record defaulting with the current record.

 

Anyone know if the apparent check restricting circular references in the data can be disabled by the SalesForce feature activation customer support?  I called a different area of customer support and the person seemed to be under the assumption that it couldn't be changed without any reasoning why.

 

Perhaps the validation rule was created by a salesforce developer over-protecting the system so he could guarantee no infinate loops ever?  In theory poorly coded Apex especially triggers could be following lookups in the data and get lost in an infinate loop.  But in practice, if that happened it would violate a governor rule, and generate an API error with no harm.   I can't think of any other reason to restrict data from having circular references.  Perhaps there is more reasoning to this restriction that I'm not aware of?

 

I keep running into all of these different ways that SalesForce is crippled... perhaps one per month!  So disappointing!  Another item to add to the list of technical flaws in SalesForce that maybe I can get someone to listen to at the next DreamForce?  SalesForce may be one of the least flawed Content Management Systems (CMS), but that's why experienced people often caution against CMS instead of custom programming because of those things you need done that can't be done!