I want to update user_def13 with attachment_name. user_def13 is in the escalation table, but there is no direct relationship between the escalation and attachment tables. So, I created another table named c_escalation_extension.
I have written a business rule to insert esc_id, attachment_id, and attachment_name into c_escalation_extension. The insertion is working correctly.Â
Update operation is not working. User_def13 is not updating with attachment_name
Below is the configuration I did for the update operation in business rule and custom process
 1- Primary table = ESCALATION
 2-execution type = all rule all value match
 3-execution point = after commit insert
 4- rule inputÂ
   table = c_escalation_extension column = esc_id
       c_escalation_extension column = attachment_id
5-input parameter
  c_escalation_extension.esc_id(new) operator = equal value = blank
  c_escalation_extension.attacment_id(new) operator=equal value = blank
  Â
6- XML Query
<perform_exec_db_edit>
 <parameters>
  <sql_command><! CDATAs
   UPDATE escalation
   SET user_def13 = ce.attachment_name
   FROM escalation e
   INNER JOIN c_escalation_extension ce
    ON e.esc_id = ce.esc_id
   WHERE ce.attachment_id IS NOT NULL
    AND EXISTS (
     SELECT 1
     FROM attachment a
     WHERE a.attachment_id = ce.attachment_id
    )
  ]]></sql_command>
 </parameters>
</perform_exec_db_edit>
Please suggest if any changes required or suggest solution for this issue.
Â
Find the attachment of business rule for your reference