• Derhyk Doggett -
  • NEWBIE
  • 179 Points
  • Member since 2015
  • Business Functional Analyst, Salesforce
  • Sandvine Inc.

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 16
    Likes Given
  • 4
    Questions
  • 33
    Replies
Hey all, 

I'm having a bit of trouble trying to figure out where to start on writing a trigger that would display the sum of all orders for a given Account on the Account page.  I've created a custom currency field on the Account record "Order_Grand_Total__c" but actually populating that field via apex trigger is where I'm stuck.  I thought I'd be able to do a roll-up summary field but it appears that only works with the Opportunities object and not the standard Order object.

Any help in the right direction is much appreciated!!
Hello,

How can you check access to users or profiles for price books ?

Thank you
  • January 26, 2016
  • Like
  • 1
Hi, 

I'm trying to do the Writing SOQL Queries Challenge on Trailhead but i'm getting the following error:

There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 30115000000LJiz. Contact your administrator for help.: []

I've looked and some people say there might be an issue with a validation rule or trigger that is preventing the validation. I've checked and i don't have any active validation rules or triggers on the case object. From what I can tell, my code is fine:

public class ContactSearch {
        public static List<Contact> searchForContacts(String lastName, String mailingPostalCode) {
            return [SELECT Id, Name, LastName, MailingPostalCode
                                     FROM Contact
                                     WHERE LastName = :lastName AND MailingPostalCode = :mailingPostalCode];
        }   
    }

Any thoughts on why it's not validating? Thanks!

-Mike
I am wondering if anyone has created an area like ticket comments that will allow you to fill in if you call a customer relating to a case.

All I would like it to do is either a button you press called "Called Customer" and it displays a window where you enter person name - list of the call contents and it adds it to a phone call area or something. This will help us get a better case history, I.E. How many phone calls made - by who - what was mentioned in the phone call
Facing Issues Trigger Order of Execution with managed Package
have the following situation I am hoping to have some assistance solving.
I've built callouts on two objects, call them Object A and B. Object A and B are both part of a managed package and thus there are certain aspects I cannot see or edit.
Object A has related Object B records.
I have an integration callout via trigger and helper classes when Object A is updated, and similar functionality when Object B is updated.
The callouts run in the after statements of the triggers.
There is a Managed Package that has a trigger on Object B that updates Object A. By my assumptions (cannot see the code), when Object B is updated, it has a before trigger that updates related record A.

When Object A is updated, callout is sent (JSON Structure, etc). Works as expected.
When Object B is updated, callout is sent for Object A, then a callout is sent for Object B. I only want to send callout for Object B here.

The only thing I am looking to accomplish is prevent the Object A callout when Object B is update (and maintain the original Object A callout when a user updates Object A)

I've tried adding a variable to class that's true by default, but is set to false in a before trigger on Object B.
Running in debug, it's true for the Object A callout, then is set to false before the Object B callout. My assumption here is that the before actions in the managed package code are occurring before my custom before and thus running the Object A callout before the variable is set to false.

Any help greatly appreciated!!

Thanks

--Derhyk

I've used the picklist example from this link as a starting point:
https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/MetadataServiceExamples.cls

I've run execute anonymous passing in the parameters. The picklist gets updated with the new value, but marks the previous values as inactive.
Any ideas?

Snippet of code running the update:

webService static void updatePicklistField(String picklistToUpdate, String picklistLabel, String newPicklistValue)
    {

		MetadataService.MetadataPort service = createService();
        MetadataService.CustomField customField = new MetadataService.CustomField();
        customField.fullName = picklistToUpdate; //This is the picklist field. This must in the format Object.Field (append __c for custom object/field)
        customField.label = picklistLabel; //This field is needed in update
        customField.type_x = 'Picklist';
        metadataservice.Picklist pt = new metadataservice.Picklist();
        pt.sorted= false;
        metadataservice.PicklistValue newPlValue = new metadataservice.PicklistValue();
        newPlValue.fullName  = newPicklistValue; //This is the new picklist value
        newPlValue.default_x =false ;
        pt.picklistValues = new list<metadataservice.PicklistValue>{newPlValue};
        customField.picklist = pt ;
        List<MetadataService.SaveResult> results =
            service.updateMetadata(
                new MetadataService.Metadata[] { customField });
        handleSaveResults(results[0]);
    }

Run Execute Anonymous below:

MetadataHandler.updatePicklistField('Account.Access_Type__c','Access Type','Metadata');

Results in the following. note the now one active value and newly marked inactive values:
User-added image
 

I'm fairly new the the Json methods available in Apex, and once discovered how easy it is to use, love it, but am struggling with more than 1 level deep of object relation.
Originally I only needed to gather Order and OrderItems, create a Json string, pass it on.
Now a third level has been added where I need to gather a third level object, Order Items Pricing, that are related to the OrderItems.
Since SOQL only allows one additional level for subqueries, I'm struggling with how to gather the Order, OrderItems, Pricing Conditions as one and send it through the serializer.

The below is essentially what I want to accomplish, but as soon as going 3 levels deep in SOQL it throws the error: 'SOQL statements cannot query aggregate relationships more than 1 level away from the root entity object.'

I know I can run a seperate query to gather the Order Items Pricing in another query, but I am unsure how to append that to the 'jsonOrder' record so it is included in the json string.
Thanks in Advance!

Order jsonOrder = [SELECT Name, Id, Type, Partner_SAP_Customer_Number__c, PoNumber, PoDate, Quote_Number__c, Quote_ID__c, Opportunity_ID__c,Access_Type__c, CurrencyIsoCode, Opportunity_Pricing_Date__c, Order_Tier__c, Order_Reason__c, Requested_Shipping_Date__c, 
									Soldto_ID__c, Shipto_ID__c, Endcustomer_ID__c, Opportunity_Owner_ID__c,
									Shipping_Conditions__c, Payment_Terms__c, Inco_Terms__c, SAP_Order_Number__c,
									(SELECT Id, Product_Code__c, Revision_Material__c, VC_Material__c, Quantity,
									Validity_Period__c, Training_Location__c, Usage__c,
									ListPrice, Discount__c, WHT_Rate__c, Project_Credit_Discount_P__c,
									Fair_Value__c, Configuration__c, (SELECT Id, SAP_Pricing_Condition__c,  Pricing_Value__c, Pricing_Condition_Value__c
									FROM Order_Items_Pricing__r)	
									FROM OrderItems),
									(SELECT Id, Partner_Function_Code__c, SAP_ACCT_ID__c 	
									FROM Order_Partner_Functions__r)
									FROM Order
									WHERE id =: sforder.id LIMIT 1];
		OrderJsonString = JSON.serializePretty(jsonOrder); 
		System.debug('Json for SFOrder: '+OrderjsonString);
		return OrderJsonString;
Hi All,
We have a package deployed similar to the links below in our org to allow incoming case emails to be appended to the case comments
https://success.salesforce.com/answers?id=90630000000glk9AAA
https://developer.salesforce.com/forums/?id=906F000000091R2IAI

The problem on some comments is they break when multiple Hyphens in a row occur.
I believe this is because this is how the code determines the break between a reply so the entire email thread is not included in the comment, only the most recent reply is included.

Does anyone have any ideas for a workaround?
Thank you!

Examples and code below.
This comment from email:
SDE> show service spb connections 

Id Type Failures OperStatus AdminStatus ConfiguredURI ConnectedURI LastTimeConnected 
----- ------------------- -------- ----------- ----------- ----------------------------- -------------- ----------------------- 

Id APIVersion 
----- ---------- 
11863 [2] 

SDE> 

SDE> show service spb connections diagnostics 

Diagnostic Result 
--------------- ------- 
ResolveHostname n/a 
PingIps Success 
ClientProcess Success 
ServerSocket Success 
BrokerMessage Success

Becomes:
SDE> show service spb connections

Id Type Failures OperStatus AdminStatus ConfiguredURI ConnectedURI
LastTimeConnected

Here is the Class handling the Incoming Emails and Appending the Case Comment:
public class EmailMessageCopytoCaseCommentHelper {
    public static void copyEmailMessagesToCaseComments(List<EmailMessage> emails){
		integer MAXSIZE = 3900;
        List<CaseComment> comments = new List<CaseComment>();
        for (EmailMessage email:emails){
            Id caseId = email.ParentId;
            CaseComment comment = new CaseComment(ParentId=caseId);
            comment.IsPublished=true;
            String header = 'From: '+ email.FromName + ' <' + email.FromAddress + '>\n';
            header += 'To: '+ email.ToAddress + '\n';
            header += email.CcAddress!=null?'CC: '+ email.CcAddress + '\n\n':'\n';
            Integer worknoteStart=0;
            Integer headerSize = header.length();
            String cbody='';
			if (email.TextBody!=null) {
   				String body = email.TextBody;
				Integer results = body.length();
				Integer worknoteEnd = body.IndexOf('-----');
				if(worknoteEnd+headerSize>MAXSIZE){
					worknoteEnd = MAXSIZE - headerSize;
				}else if(worknoteEnd==-1){
					worknoteEnd = (results+headerSize > MAXSIZE)? (MAXSIZE - headerSize):results;
				}
    			cbody = header + body.substring(worknoteStart, worknoteEnd); 
    			system.debug('\n\nTEXTBODY'+cbody);
			} else if (email.HtmlBody!=null) {
				String body = email.HtmlBody;
				Integer results = body.length();
				Integer worknoteEnd = body.IndexOf('-----');
				if(worknoteEnd+headerSize>MAXSIZE){
					worknoteEnd= MAXSIZE - headerSize; 
				}else if(worknoteEnd==-1){
					worknoteEnd = (results+headerSize > MAXSIZE) ? (MAXSIZE - headerSize):results;
				}
				cbody = header + body.substring(worknoteStart, worknoteEnd).replaceAll('\\<.*?>','');
				system.debug('\n\nHTMLBODY'+cbody);
			}
			
			if(cbody.length()>(MAXSIZE-1)){
				comment.CommentBody=cbody.left((MAXSIZE-1));
                Integer chkbodysize=comment.CommentBody.length();
                system.debug(chkbodysize);
			}else{
				comment.CommentBody=cbody;
			} 
			comments.add(comment);
		}
        try{
        	if (!comments.isEmpty()){
            	insert comments;
        	}	
        }catch(DMLException d){
        	throw new SVException('Error Copying Email to Comment: Field(s): '
        					+d.getDMlFieldNames(0)
        					+' Status: '
        					+d.getDmlType(0)
        					+ ' Body Size:'
        					+comments[0].CommentBody.length()
        					+' ID REF:'
        					+comments[0].ParentId);
        					
        }
        
    }
}

Thanks

-derhyk

 
Hi there, how do you pull/retrieve the Org's Account, Contact, Lead, etc, Classes & Objects, into VS Code? I can see only Custom Objects. Thanks!!
Hi,
I have written visual email templates and I want to display logo but it is not showing logo.

Here my Template:

<messaging:emailTemplate subject="Regarding Student" recipientType="Contact" relatedToType="user">
<messaging:plainTextEmailBody >

{!RelatedTo.FirstName} {!RelatedTo.LastName} 
_____________________________________________
Continental 
Division  {!RelatedTo.Division__c}
Segment   {!RelatedTo.Segment__c}
Rechnungsanschrift/Billing address {!RelatedTo.Billing_Address__c}
Mobile            {!RelatedTo.MobilePhone}
Email             {!RelatedTo.Email}  
Visit us @        {!RelatedTo.URL__c}
______________________________________________

http://www.continental-corporation.com  

<img src="https://testguru--test1--c.cs50.visual.force.com/resource/1509087818000/Contitechtest" 
    width="200" height="200"/> 

</messaging:plainTextEmailBody>
</messaging:emailTemplate>


Here is Preview:

Guru 
_____________________________________________
Continental 
Division  
Segment   IT
Rechnungsanschrift/Billing address Jeevan Bhema Nagar
Mobile            (709) 708-5320
Email             vguru@race2cloud.com  
Visit us @        www. race2cloud.com
______________________________________________

http://www.continental-corporation.com  

<img height="200" src="https://testguru--test1--c.cs50.visual.force.com/resource/1509087818000/Contitechtest" width="200" />
Using the Force.com Migration Tool (Ant) v1.9.4 to deploy from one sandbox to another both on Spring '17 results in 

21.  profiles/Admin.profile -- Error: Unknown user permission: ManageSandboxes
22.  profiles/Finance.profile -- Error: Unknown user permission: ManageTranslation

If the orgs are on the same release, how is the target returning an error here. 

Lots and lots of migrations to do so any help appreciated!

I've used the picklist example from this link as a starting point:
https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/MetadataServiceExamples.cls

I've run execute anonymous passing in the parameters. The picklist gets updated with the new value, but marks the previous values as inactive.
Any ideas?

Snippet of code running the update:

webService static void updatePicklistField(String picklistToUpdate, String picklistLabel, String newPicklistValue)
    {

		MetadataService.MetadataPort service = createService();
        MetadataService.CustomField customField = new MetadataService.CustomField();
        customField.fullName = picklistToUpdate; //This is the picklist field. This must in the format Object.Field (append __c for custom object/field)
        customField.label = picklistLabel; //This field is needed in update
        customField.type_x = 'Picklist';
        metadataservice.Picklist pt = new metadataservice.Picklist();
        pt.sorted= false;
        metadataservice.PicklistValue newPlValue = new metadataservice.PicklistValue();
        newPlValue.fullName  = newPicklistValue; //This is the new picklist value
        newPlValue.default_x =false ;
        pt.picklistValues = new list<metadataservice.PicklistValue>{newPlValue};
        customField.picklist = pt ;
        List<MetadataService.SaveResult> results =
            service.updateMetadata(
                new MetadataService.Metadata[] { customField });
        handleSaveResults(results[0]);
    }

Run Execute Anonymous below:

MetadataHandler.updatePicklistField('Account.Access_Type__c','Access Type','Metadata');

Results in the following. note the now one active value and newly marked inactive values:
User-added image
 

Hi Forum,
This is a bit of an embarrsement. Having read through the superbadge requirements and spending most of Sunday configuring and re-configuring User profiles, I havent passed this check.
 
The Inside Sales User does not appear to have the correct object permissions for Accounts and Opportunities

What's strange is that I was stuck on "field sales user" and now I'm stuck at "Inside Sales User".

I believe the OWD's are fine as well as the Object Permissions as well as the Profile setup. I was wondering if there would be a way to verify the error.  In the meantime I will continue to persist.

Regards
Mark
 
Hello guys,

How to redired on below page after click the button. I want to redirect on following page after click their page page. How to get id of this page?

User-added image
Hey all, 

I'm having a bit of trouble trying to figure out where to start on writing a trigger that would display the sum of all orders for a given Account on the Account page.  I've created a custom currency field on the Account record "Order_Grand_Total__c" but actually populating that field via apex trigger is where I'm stuck.  I thought I'd be able to do a roll-up summary field but it appears that only works with the Opportunities object and not the standard Order object.

Any help in the right direction is much appreciated!!
I'm working on the Quick Start: Lightning Process Builder project in Trailhead and am getting the below error but have confirmed multiple times (even had a co-worker take a look) that I have complete all of the steps.  I am seeing that the Lightnight Process Builder criteria option is "Is changed" while the example shows "Is Changed" (uppercase C).  Could that be causing the error.

I'm failing on the "Add Criteria" and "Add Your Process Action" tasks on this project, I've passed the other two.  

Below is a screen shot of my error message and the Process Builder.

Error Message
User-added image

Criteria on Account
User-added image

Action on Contact
User-added image

What am I missing?
Hey, 

I'm working on the "Integrating External Data" Trailhead and I'm running into this issue. I'm stumped because as far as I can tell, I have everything in correctly. Any ideas?

screen shot

Thanks. 

-Mike
I want the picture of the document displayed. I can add our logo at the top, but I want to be able to edit the actual language that seems to be default from Adobe,

thanks,
If I create a package in salesforce for my app, an error is shown: 
No test methods found in the Apex code included in the package. At least 75% test coverage is required. 

I have more than 2000 lines of code in visualforce page and its controller. This requirement means that I have to re-write all my code??

Thanks in advance.
Hi,

   I need to add a condition on trigger where it must not fire when a lead is converted into account and opportuntiy and contact Please suggest me some condition how to add this logic inside the trigger. 

Thanks
Sudhir
Hello Apex Masters!
 
I'm new on Apex and I'm trying to create a trigger that prevents Salesforce from saving child records.

Parent record: "Account"
Custom child record: "Budget" --> Fields: "Year"(picklist) and "Amount" (picklist, four values)

Conditions for saving related child records:

- Maximum of 3 "Budget" child records per related account and "Year" (e.g. "2016")
- Sum(Amount) of related "Budget" child records must be <= $500 per year

Can you help me with this?
It seems not to be working with validation rules.
Hi All 

I have a list of Tasks which created in a apex class;
Task task1=new Task();
task1.subject;..
...

Task task2=new Task();
task2.subject....
....

etc

myTasklist.add(task1);
myTasklist.add(task2);
......
......

And finally i need to insert all the tasks ( List) ??

How can i do that????

Thanks a lot everyone...
 
I can't figure out how to do this.  There seems to be no global constant for blank/null associated with Date fields, and if I simply leave the assignment box empty it doesn't do anything.
Hi.. I just came noticed an unknown behavior (to me) in Apex.
I used the below query to pull the data from Case Object.
Select Id, Account.PersonMailingPostalCode from Case
And the below are my System.debug statements..
System.debug('********** Account = ' + caseList[0].Account);
System.debug('********** PersonMailingPostalCode = ' + caseList[0].Account.PersonMailingPostalCode);
The debug logs shows as below without any exception..
'********** Account = null
*********** PersonMailingPostalCode = null
which means that the account is not associated to the case yet. So the caseList[0].Account is null
So how come the second statement to fetch the postal code from Account doesnt throw Null pointer exception but still prints as null. Is this because of the way I query the record??
 
Hello guys,

How to redired on below page after click the button. I want to redirect on following page after click their page page. How to get id of this page?

User-added image
Hey all, 

I'm having a bit of trouble trying to figure out where to start on writing a trigger that would display the sum of all orders for a given Account on the Account page.  I've created a custom currency field on the Account record "Order_Grand_Total__c" but actually populating that field via apex trigger is where I'm stuck.  I thought I'd be able to do a roll-up summary field but it appears that only works with the Opportunities object and not the standard Order object.

Any help in the right direction is much appreciated!!
Hey, 

I'm working on the "Integrating External Data" Trailhead and I'm running into this issue. I'm stumped because as far as I can tell, I have everything in correctly. Any ideas?

screen shot

Thanks. 

-Mike
If I create a package in salesforce for my app, an error is shown: 
No test methods found in the Apex code included in the package. At least 75% test coverage is required. 

I have more than 2000 lines of code in visualforce page and its controller. This requirement means that I have to re-write all my code??

Thanks in advance.
Hi,

   I need to add a condition on trigger where it must not fire when a lead is converted into account and opportuntiy and contact Please suggest me some condition how to add this logic inside the trigger. 

Thanks
Sudhir
Hello Apex Masters!
 
I'm new on Apex and I'm trying to create a trigger that prevents Salesforce from saving child records.

Parent record: "Account"
Custom child record: "Budget" --> Fields: "Year"(picklist) and "Amount" (picklist, four values)

Conditions for saving related child records:

- Maximum of 3 "Budget" child records per related account and "Year" (e.g. "2016")
- Sum(Amount) of related "Budget" child records must be <= $500 per year

Can you help me with this?
It seems not to be working with validation rules.
Hello,

How can you check access to users or profiles for price books ?

Thank you
  • January 26, 2016
  • Like
  • 1
Hi All 

I have a list of Tasks which created in a apex class;
Task task1=new Task();
task1.subject;..
...

Task task2=new Task();
task2.subject....
....

etc

myTasklist.add(task1);
myTasklist.add(task2);
......
......

And finally i need to insert all the tasks ( List) ??

How can i do that????

Thanks a lot everyone...
 
I am using Tinderbox as my 3rd party contract proposal management software.

In order to create a document in TB, it has to reference a field from the Lead.  So If I want to send "Blah" Proposal, I will need to have "Blah" in a specified field prior to submitting the request to TB. TB will then select the template based upon the string in the specified field.

I need to clear the text of the field about 5-10 seconds after submitting the request to TB.  I have seen scripts out there that can help me with the delay, so I am not too worried about that, but I need to do something along these lines:

If Field contains text then wait 5 seconds and set the text back to nothing.

Here is what I have so far:
 
trigger ClearTempHook on Lead (before insert, before update) {
	//List<String> LeadNames = new List<String>{};
	for(Lead myLead: Trigger.new){
 		if((myLead.temp_hook__c=='c')){
            temp_hook__c == 'hello';
		}
	}
}

 
<apex:page extensions="OnlinePurchaseController" showHeader="false" sidebar="false" standardController="Order__c">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:selectList value="{!selectedCategory}" label="Category" size="1">
                    <apex:actionSupport event="onchange" action="{!getProducts}" reRender="products"/>
                    <apex:selectOptions value="{!category}">
                    </apex:selectOptions>
                </apex:selectList>
             </apex:pageBlockSection>
            
            
             <apex:pageBlockSection >    
                <apex:pageBlockTable value="{!productList}" var="product" id="products">
                    <apex:column >
                        <apex:commandButton value="add" action="{!addToOrder}" reRender="orders,products">
                            <apex:param name="productID" value="{!product.ID}" assignTo="{!productID}"></apex:param>
                           </apex:commandButton>
                    </apex:column>
                    <apex:column value="{!product.Name}" />
                    <apex:column value="{!product.Price_Per_Item__c}" />
                </apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock >
        <apex:pageBlockSection id="orders">    
                <apex:pageBlockTable value="{!orderList}" var="order" >
                    <apex:column value="{!order.Name}"  headerValue="Name" />
                    <apex:column value="{!order.Price_Per_Item__c}" headerValue="Price Per Item" />
                       <apex:column headerValue="Quantity">
                        <apex:outputField value="{!order.Quantity__c}"  >
                            <apex:inlineEditSupport showOnEdit="update" event="ondblclick" /> 
                        </apex:outputField>
                    </apex:column> 
                    <apex:column headerValue="Total">
                        <apex:inputField value="{!order.Total__c}" />
                    </apex:column>
                </apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
I can't figure out how to do this.  There seems to be no global constant for blank/null associated with Date fields, and if I simply leave the assignment box empty it doesn't do anything.
Hi folks-

I've been working on this problem for several weeks where I've built a VF page to mimic the functionality of Case which includes related list functions such as "Send Email" and "Case Comments"

Instead of rebuilding the functionality of Send Email within VF, I direct the user to those standard pages and then use a redirect to my Visualforce page. 

When the user returns to the page, there is no refresh recording the sent email, the user has to do a hard refresh to see that update. 

The Console methods like Tab refresh explicity states that they don't work with Visualforce pages. Is there any way to accomplish this other than having to rebuild all that functionality within Visualforce?

I am happy to post my code, but it just a PageReference class to point the user back to the VF page. 

Hoping someone else has run across a similar issue. 

Much thanks!

 
Hi.. I just came noticed an unknown behavior (to me) in Apex.
I used the below query to pull the data from Case Object.
Select Id, Account.PersonMailingPostalCode from Case
And the below are my System.debug statements..
System.debug('********** Account = ' + caseList[0].Account);
System.debug('********** PersonMailingPostalCode = ' + caseList[0].Account.PersonMailingPostalCode);
The debug logs shows as below without any exception..
'********** Account = null
*********** PersonMailingPostalCode = null
which means that the account is not associated to the case yet. So the caseList[0].Account is null
So how come the second statement to fetch the postal code from Account doesnt throw Null pointer exception but still prints as null. Is this because of the way I query the record??
 
I wrote a trigger on the User object on the after inserted and after updated events. The trigger fires on the inset event, but not on the update event. I wrote a test class to verify and the same thing happened. Any ideas as to why? I don't see any solutions on this topic.
Hi, 

I'm trying to do the Writing SOQL Queries Challenge on Trailhead but i'm getting the following error:

There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 30115000000LJiz. Contact your administrator for help.: []

I've looked and some people say there might be an issue with a validation rule or trigger that is preventing the validation. I've checked and i don't have any active validation rules or triggers on the case object. From what I can tell, my code is fine:

public class ContactSearch {
        public static List<Contact> searchForContacts(String lastName, String mailingPostalCode) {
            return [SELECT Id, Name, LastName, MailingPostalCode
                                     FROM Contact
                                     WHERE LastName = :lastName AND MailingPostalCode = :mailingPostalCode];
        }   
    }

Any thoughts on why it's not validating? Thanks!

-Mike
I am wondering if anyone has created an area like ticket comments that will allow you to fill in if you call a customer relating to a case.

All I would like it to do is either a button you press called "Called Customer" and it displays a window where you enter person name - list of the call contents and it adds it to a phone call area or something. This will help us get a better case history, I.E. How many phone calls made - by who - what was mentioned in the phone call