Notifications

462 views

Description

Creating a simple 2-step Flow that creates an incident record in step one.

Step two sends an email to the sender of the email record from step 1, referencing the newly-created incident record.

Sometimes the customer wants this reference so the response can be watermarked.

Step two always fails with the error below whenever it references the incident record. However, when I remove the incident record reference, step two succeeds.

Running the flow as a system user does not make any difference in the outcome - always the same error.

Setting the Reply Record Type to Incident AND to just leave it blank - same error.

txid=35be2c53dbe4 SEVERE *** ERROR *** Flow Designer: Operation(Create Ticket Send Reply.35bee093dbe48450dba9d0b2ca9619bf.4b1241160b100300d97d8bf637673a6f) failed with error: com.snc.process_flow.exception.OpException: Email validation failed: Table record ID doesn't exist or ACL restricts retrieval: incident incident
at com.snc.process_flow.operation.EmailOperation.run(EmailOperation.java:84)
at com.snc.process_flow.engine.Operation.execute(Operation.java:68)
at com.snc.process_flow.engine.ProcessEngine.executeOps(ProcessEngine.java:407)
at com.snc.process_flow.engine.ProcessEngine.run(ProcessEngine.java:355)
at com.snc.process_flow.engine.ProcessAutomation.run(ProcessAutomation.java:55)
at com.snc.process_flow.engine.GlideProcessAutomation.runSync(GlideProcessAutomation.java:124)
at com.snc.process_flow.engine.GlideProcessAutomation.lambda$runAsUserSync$0(GlideProcessAutomation.java:209)
at com.snc.process_flow.engine.GlidePFSession.runPlanAsUserSession(GlidePFSession.java:26)
at com.snc.process_flow.engine.GlideProcessAutomation.runAsUserSync(GlideProcessAutomation.java:201)
at com.snc.process_flow.engine.GlideProcessAutomation.messageFlow(GlideProcessAutomation.java:238)
at com.snc.process_flow.engine.GlideProcessAutomation._start(GlideProcessAutomation.java:344)
at com.snc.process_flow.engine.GlideProcessAutomation.access$400(GlideProcessAutomation.java:81)
at com.snc.process_flow.engine.GlideProcessAutomation$StartBuilder.start(GlideProcessAutomation.java:872)
at com.glide.flow_trigger.engine.TestButtonTriggerRunner.run(TestButtonTriggerRunner.java:168)
at com.glide.flow_trigger.engine.TestButtonTriggerRunner.test(TestButtonTriggerRunner.java:172)
at com.glide.flow.providers.FlowGlideProvider.testFlow(FlowGlideProvider.java:992)
at com.glide.flow_design.rest.FlowService.testRunFlow(FlowService.java:573)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.glide.rest.handler.impl.ServiceHandlerImpl.invokeService(ServiceHandlerImpl.java:44)
at com.glide.rest.processors.RESTAPIProcessor.process(RESTAPIProcessor.java:290)
at com.glide.processors.AProcessor.runProcessor(AProcessor.java:553)
at com.glide.processors.AProcessor.processTransaction(AProcessor.java:240)
at com.glide.processors.ProcessorRegistry.process0(ProcessorRegistry.java:177)
at com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:166)
at com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:31)
at com.glide.sys.Transaction.run(Transaction.java:2203)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

Resolution

First part

  1. Create a custom action (RecordToID) to take the sys_id from an input record:
  2. Inputs: DocumentID reference to Incident table
  3. Add an empty script step (Actions require at least one step)
  4. Outputs: String
  5. Using the Fx button on the output, return the input record sys id

Second part

  1. In the target flow, add the RecordToID action after the Create Incident action and before the Send Email action.
  2. Add the incident as input to the RecordToID.
  3. Update the Send Email action by dragging the incident record onto the target record field (this is important to set the target table field).
  4. Click the Fx button on the target record field and return the output of the RecordToID action above.

Article Information

Last Updated:2020-01-13 01:00:38
Published:2020-01-13