• Christopher Shade
  • 0 Points
  • Member since 2014

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
  • 4
I have access to the pilot of the Trigger Flow tool and am just trying to set up the simplest trigger flow possible.

The flow is comprised of a single element, a record update, which is just taking the record ID from the trigger flow as a variable and setting a new field to 2.

User-added image

However, I keep getting the following error:
Encountered unhandled fault when running process Solution_Specialist_Assignment/301U0000000H2QR exception by user/organization: 00DU0000000J4OM/{4}

; nested exception is:
common.exception.ApiException: An unexpected error occurred. Please include this ErrorId if you contact support: 2136417830-25505 (-548403183)

caused by element : FlowRecordUpdate.Record_Update

caused by: ; nested exception is:
common.exception.ApiException: An unexpected error occurred. Please include this ErrorId if you contact support: 2136417830-25505 (-548403183)

Salesforce Error ID: 2136417830-25506 (1246647293)

What am I doing wrong?
I'm going through the intro to Apex Trigger's and SalesForce has you build the trigger below.

How would I add critera to the Trigger below so that the variable Books doesn't contain all records in the object Book__c? 

For instance, it is apply a discount to the Price__c field.  If I only wanted apply the discount if the price were beneath a given amount how would I code that?

trigger HelloWorldTrigger on Book__c (before insert) {

   Book__c[] books = Trigger.new;


Does anybody know how can I find the layout assigned to a particular user from Apex?
I know that the Metadata API will give me that information:   
 MetadataService.Profile profile = (MetadataService.Profile)service.readMetadata('Profile', new String[] { profileName }).getRecords()[0];
           for(MetadataService.ProfileLayoutAssignment layoutAssignment : profile.layoutAssignments) {
               if(layoutAssignment.layout.startsWith('Account')) {
                   accountLayoutName = layoutAssignment.layout;
but the metadata API is not available from within Apex and using the MetadataService provided by FinancialForce.com (great job guys) seems like an overkill to me.
Also does anybody know if the MetadataAPI counts towards your API call limits?

I need to create a hyperlink formula field to create Tasks from reports. Please help ASAP
Suppose I create a  report on Account object and there should be a Hyperlink Formula Field called Create Task and the field value should be a hyperlink (Title should be Click to create task). Once I click on the Hyperlink in the report it should open Create Task window and it should automatically relate to the same Account where I Clicked.
Example Report:
Account Name     Create Task                   City      State    
    ABC                Click to Create Task         xxx        NY
    XYZ                Click to Create Task          xxx        NJ
So once I click on Click to Create Task link it should open new task window  and relate the task to ABC or XYZ Account automatically. 
  • October 22, 2014
  • Like
  • 0
I'm wondering if there is anyway to create something like a "roll up summary" for attachments on a Contract? More specifically, I want to be able to verify that there is at least 1 attachment on the Contract when the Contract is activated. 

Any advice is appreciated. 
  • October 22, 2014
  • Like
  • 0

We are capturing a few custom fields at product level and wanted to use them in some calculation. The result of the calculation needs appear on Opportunity custom fields.

Let us say, the product has field1 and field2 custom fields..I wanted to multiply these fields first and summarize this value for all products and update on opportunity(kind of rollup)

Example formula: SUM of all products(field1 * field2).

Having said that, I tried with workflow field update..I was able to get the custom field in workflow field update on OpportunityLineitem but I don't know how to to aggregate this for all products.

I was thinking trigger is the only option for this and here is the approach.
  1.     Create a trigger on OpportunityLineitem which gets fired anytime a product added to Opportunity
  2.     In the trigger do calculation based on the product custom fields and aggregate the value for all line items.
  3.     Update opportunity.

Before moving forward, I wanted to make sure I am in the right direction OR it could be achieved with out a trigger using workflow field update or any other means.

Appreciate your feedback.