December 27, 2011

Party Merge Alert CRM


                                                                     
                                                                     
                                                                     
                                             
ALERTS


1.Party Merge

Table from :HZ_MERGE_PARTIES 
Table to Update:XXPN_TRANSACTION_LINES
Alert_Name:XX_CUST_ALERT
Application:Receivables

Event type:

SELECT FROM_PARTY_ID,TO_PARTY_ID 
INTO &FROM_PARTY,&TO_PARTY
FROM  APPS.HZ_MERGE_PARTIES  
WHERE FROM_PARTY_ID!=TO_PARTY_ID
AND MERGE_TYPE='PARTY_MERGE'
AND MERGE_REASON_CODE='MERGER'
AND ROWID=:ROWID

Action Type:

begin
UPDATE XXPN_TRANSACTION_LINES
SET PARTY_ID=&TO_PARTY
WHERE PARTY_ID=&FROM_PARTY;
end;
/


************************************************

2.Account Merge

Table from RA_CUSTOMER_MERGE_HEADERS 
Table to XXPN_TRANSACTION_LINES
Alert name:XX_ACCOUNT_MERGE


Event type: select DUPLICATE_ID,CUSTOMER_ID 
      INTO &FROM_CUST,&TO_CUST
      from RA_CUSTOMER_MERGE_HEADERS 
      where MERGE_REASON_CODE='MERGER'
      and PROCESS_FLAG='Y'
      and DUPLICATE_ID!=CUSTOMER_ID
      AND ROWID=:ROWID
      
      
      Action_type:
      
      BEGIN
      UPDATE APPS.XXPN_TRANSACTION_LINES 
      SET CUSTOMER_ACCOUNT_ID=&TO_CUST WHERE CUSTOMER_ACCOUNT_ID=&FROM_CUST;
      END;
      /

No comments:

Post a Comment

Thanks for your comments submitted.,will review and Post soon! by admin.

COALESCE-SQL

Coalesce- return the null values from the expression. It works similar to a case statement where if expression 1 is false then goes to expr...