0

I have this below flow which i am triggering it from apex trigger. he scenario is

When i am creating an Account, i have a email field Email__c. I will be filling this Email__c like Email__c = 'test@gmail.com'.

In the flow i have a text variable accountEmail. I am checking if any record in Contact object is having the entered Email__c, then create a record in AccountContact__c object.

The issue is --> Unable to create record in AccountContact__c object.Dont know where the issue is.

I am getting an error while creating account -

Apex trigger AcountTriger caused an unexpected exception, contact your administrator: AcountTriger: execution of AfterInsert caused by: System.UnexpectedException: Salesforce System Error: 1301043935-22543 (1350809315) (1350809315): Trigger.AcountTriger: line 8, column 1

Apex Trigger -

trigger AcountTriger on Account (after insert,after update) {
    Map<String, Object> params = new Map<String, Object>();
    for(Account acc : Trigger.new){
        params.put('accountEmail',acc);
        Flow.Interview.test testflow = new Flow.Interview.test(params);
        testflow.start();
        String localOutputParameter = (String)testflow.getVariableValue('accountEmail');
    }
}

Record Lookup

Create Redord

  • Are you receiving an exception email? What actual behavior are you observing? – David Reed Mar 21 '18 at 10:40
  • I am getting an error -Apex trigger AcountTriger caused an unexpected exception, contact your administrator: AcountTriger: execution of AfterInsert caused by: System.UnexpectedException: Salesforce System Error: 1301043935-22543 (1350809315) (1350809315): Trigger.AcountTriger: line 8, column 1 – learnjqueery Mar 21 '18 at 10:42
  • Got the prob...The issue is fixed now.... – learnjqueery Mar 21 '18 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.