Skip to content
  • About Me: Shailender Thallam
  • Contact
  • Oracle Apps Interview Questions
    • Ask a Question
  • About Me: Shailender Thallam
  • Contact
  • Oracle Apps Interview Questions
    • Ask a Question

API to Create Customer Contacts

  • by Shailender Thallam
  • October 29, 2015
  • 1 Comment

To create Customer Contacts we need to use a series of APIs in a sequential manner, in this post I will explain you how to use the APIs to create a Customer Contact.

Below are the steps to create customer contacts

  1. Create a customer contact as a Party of type ‘PERSON‘
  2. Then establish a relation between the Person Party and the Organization Party (main party, means Customer)
  3. Then create contact at Account level or Site level of the customer
  4. Then create contact point(Phone, email, fax) for the person

Step 1: Creating Contact as a Party of type PERSON

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*************************************************
 *PURPOSE: To create a Party of type PERSON      *
 *AUTHOR: Shailender Thallam                     *
 *************************************************/
SET define off;
SET serveroutput ON;
 
DECLARE                       
   lv_return_status    VARCHAR2 (500);
   lv_msg_count        NUMBER;
   lv_msg_data         VARCHAR2 (500);
   lv_party_id         NUMBER;
   lv_party_number     NUMBER;
   lv_profile_id       NUMBER;
   lv_api_message      VARCHAR2 (4000);
   lv_msg_index_out    NUMBER;
   lv_api_name         VARCHAR2 (150);
   lv_table_name       VARCHAR (150);
   lv_party_c_status   VARCHAR2 (1);
   lv_person_rec       hz_party_v2pub.person_rec_type;
BEGIN
   lv_person_rec.person_first_name := 'TEST-SITE-CON3';
   lv_person_rec.person_last_name := 'TEST3';
   lv_person_rec.party_rec.orig_system := 'USER_ENTERED';
   lv_person_rec.party_rec.orig_system_reference := '12345671'; --<<Must be unique>>
   lv_person_rec.party_rec.status := 'A';
   lv_person_rec.created_by_module := 'TCA_V1_API';
   --
   hz_party_v2pub.create_person (p_init_msg_list      => apps.fnd_api.g_false,
                                 p_person_rec         => lv_person_rec,
                                 x_party_id           => lv_party_id,
                                 x_party_number       => lv_party_number,
                                 x_profile_id         => lv_profile_id,
                                 x_return_status      => lv_return_status,
                                 x_msg_count          => lv_msg_count,
                                 x_msg_data           => lv_msg_data
                                );
 
   --
   --Capturing error if not success 
   --	
   IF lv_return_status <> apps.fnd_api.g_ret_sts_success
   THEN
      FOR i IN 1 .. fnd_msg_pub.count_msg
      LOOP
         fnd_msg_pub.get (p_msg_index          => i,
                          p_encoded            => apps.fnd_api.g_false,
                          p_data               => lv_msg_data,
                          p_msg_index_out      => lv_msg_index_out
                         );
         lv_api_message := lv_api_message || ' ~ ' || lv_msg_data;
         DBMS_OUTPUT.put_line ('Error: ' || lv_api_message);
      END LOOP;
   ELSIF (lv_return_status = apps.fnd_api.g_ret_sts_success)
   THEN
      DBMS_OUTPUT.put_line ('***************************');
      DBMS_OUTPUT.put_line ('Output information ....');
      DBMS_OUTPUT.put_line ('Success');
      DBMS_OUTPUT.put_line ('lv_party_id: ' || lv_party_id);
      DBMS_OUTPUT.put_line ('***************************');      
   END IF;
 
   COMMIT;
END;
/

/************************************************* *PURPOSE: To create a Party of type PERSON * *AUTHOR: Shailender Thallam * *************************************************/ SET define off; SET serveroutput on; DECLARE lv_return_status VARCHAR2 (500); lv_msg_count NUMBER; lv_msg_data VARCHAR2 (500); lv_party_id NUMBER; lv_party_number NUMBER; lv_profile_id NUMBER; lv_api_message VARCHAR2 (4000); lv_msg_index_out NUMBER; lv_api_name VARCHAR2 (150); lv_table_name VARCHAR (150); lv_party_c_status VARCHAR2 (1); lv_person_rec hz_party_v2pub.person_rec_type; BEGIN lv_person_rec.person_first_name := 'TEST-SITE-CON3'; lv_person_rec.person_last_name := 'TEST3'; lv_person_rec.party_rec.orig_system := 'USER_ENTERED'; lv_person_rec.party_rec.orig_system_reference := '12345671'; --<<Must be unique>> lv_person_rec.party_rec.status := 'A'; lv_person_rec.created_by_module := 'TCA_V1_API'; -- hz_party_v2pub.create_person (p_init_msg_list => apps.fnd_api.g_false, p_person_rec => lv_person_rec, x_party_id => lv_party_id, x_party_number => lv_party_number, x_profile_id => lv_profile_id, x_return_status => lv_return_status, x_msg_count => lv_msg_count, x_msg_data => lv_msg_data ); -- --Capturing error if not success -- IF lv_return_status <> apps.fnd_api.g_ret_sts_success THEN FOR i IN 1 .. fnd_msg_pub.count_msg LOOP fnd_msg_pub.get (p_msg_index => i, p_encoded => apps.fnd_api.g_false, p_data => lv_msg_data, p_msg_index_out => lv_msg_index_out ); lv_api_message := lv_api_message || ' ~ ' || lv_msg_data; DBMS_OUTPUT.put_line ('Error: ' || lv_api_message); END LOOP; ELSIF (lv_return_status = apps.fnd_api.g_ret_sts_success) THEN DBMS_OUTPUT.put_line ('***************************'); DBMS_OUTPUT.put_line ('Output information ....'); DBMS_OUTPUT.put_line ('Success'); DBMS_OUTPUT.put_line ('lv_party_id: ' || lv_party_id); DBMS_OUTPUT.put_line ('***************************'); END IF; COMMIT; END; /

Step 2: Establish a relation between the Person Party and the Customer (main party)

Input Parameters for below Script:

  1. lv_party_id generated from step 1 and customer party_id
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*****************************************************************************
 *PURPOSE: To Establish a relation between the Person Party and the Customer *
 *AUTHOR: Shailender Thallam                                                 *
 *****************************************************************************/
SET define off;
SET serveroutput ON;
DECLARE					
 
      lv_return_status     VARCHAR2 (500);
      lv_msg_count         NUMBER;
      lv_msg_data          VARCHAR2 (500);
      lv_api_message       VARCHAR2 (4000);
      lv_msg_index_out     NUMBER;
      lv_api_name          VARCHAR2 (150);
      lv_table_name        VARCHAR2 (150);
      lv_oc_c_status       VARCHAR2 (1);
      lv_org_contact_id    NUMBER;
      lv_party_rel_id      NUMBER;
      lv_party_id          NUMBER;
      lv_party_number      VARCHAR2 (150);
      lv_org_contact_rec   hz_party_contact_v2pub.org_contact_rec_type;
   BEGIN
 
      lv_org_contact_rec.party_rel_rec.relationship_code := 'CONTACT_OF';
      lv_org_contact_rec.party_rel_rec.relationship_type := 'CONTACT';
 
      lv_org_contact_rec.party_rel_rec.subject_id := 47903; --<< this is party id of the contact created in Step 1>>
      lv_org_contact_rec.party_rel_rec.subject_type := 'PERSON';
      lv_org_contact_rec.party_rel_rec.subject_table_name := 'HZ_PARTIES';
      lv_org_contact_rec.party_rel_rec.object_type := 'ORGANIZATION';
      lv_org_contact_rec.party_rel_rec.object_id := 47804; --<< this is hz_parties.party_id of the Customer (main organization/party)>>
      lv_org_contact_rec.party_rel_rec.object_table_name := 'HZ_PARTIES';
      lv_org_contact_rec.party_rel_rec.start_date := SYSDATE;
      lv_org_contact_rec.created_by_module := 'TCA_V1_API';
 
      hz_party_contact_v2pub.create_org_contact
                                    (p_init_msg_list        => fnd_api.g_true,
                                     p_org_contact_rec      => lv_org_contact_rec,
                                     x_org_contact_id       => lv_org_contact_id,
                                     x_party_rel_id         => lv_party_rel_id,
                                     x_party_id             => lv_party_id,
                                     x_party_number         => lv_party_number,
                                     x_return_status        => lv_return_status,
                                     x_msg_count            => lv_msg_count,
                                     x_msg_data             => lv_msg_data
                                    );
   --
   --Capturing error if not success 
   --
      IF lv_return_status <> fnd_api.g_ret_sts_success
      THEN
         FOR i IN 1 .. fnd_msg_pub.count_msg
         LOOP
            fnd_msg_pub.get (p_msg_index          => i,
                             p_encoded            => fnd_api.g_false,
                             p_data               => lv_msg_data,
                             p_msg_index_out      => lv_msg_index_out
                            );
            lv_api_message := lv_api_message || ' ~ ' || lv_msg_data;
         END LOOP;
	         dbms_output.put_line('Error: '||lv_api_message);
    ELSIF (lv_return_status = fnd_api.g_ret_sts_success)
      THEN
      DBMS_OUTPUT.put_line ('***************************');
      DBMS_OUTPUT.put_line ('Output information ....');
      DBMS_OUTPUT.put_line ('Success');      
      DBMS_OUTPUT.put_line ('lv_org_contact_id: '||lv_org_contact_id);
      DBMS_OUTPUT.put_line ('lv_party_id: '||lv_party_id);
      DBMS_OUTPUT.put_line ('lv_party_rel_id: '||lv_party_rel_id);
      DBMS_OUTPUT.put_line ('***************************');
 
     END IF;
        COMMIT;
END;
/

/***************************************************************************** *PURPOSE: To Establish a relation between the Person Party and the Customer * *AUTHOR: Shailender Thallam * *****************************************************************************/ set define off; set serveroutput on; DECLARE lv_return_status VARCHAR2 (500); lv_msg_count NUMBER; lv_msg_data VARCHAR2 (500); lv_api_message VARCHAR2 (4000); lv_msg_index_out NUMBER; lv_api_name VARCHAR2 (150); lv_table_name VARCHAR2 (150); lv_oc_c_status VARCHAR2 (1); lv_org_contact_id NUMBER; lv_party_rel_id NUMBER; lv_party_id NUMBER; lv_party_number VARCHAR2 (150); lv_org_contact_rec hz_party_contact_v2pub.org_contact_rec_type; BEGIN lv_org_contact_rec.party_rel_rec.relationship_code := 'CONTACT_OF'; lv_org_contact_rec.party_rel_rec.relationship_type := 'CONTACT'; lv_org_contact_rec.party_rel_rec.subject_id := 47903; --<< this is party id of the contact created in Step 1>> lv_org_contact_rec.party_rel_rec.subject_type := 'PERSON'; lv_org_contact_rec.party_rel_rec.subject_table_name := 'HZ_PARTIES'; lv_org_contact_rec.party_rel_rec.object_type := 'ORGANIZATION'; lv_org_contact_rec.party_rel_rec.object_id := 47804; --<< this is hz_parties.party_id of the Customer (main organization/party)>> lv_org_contact_rec.party_rel_rec.object_table_name := 'HZ_PARTIES'; lv_org_contact_rec.party_rel_rec.start_date := SYSDATE; lv_org_contact_rec.created_by_module := 'TCA_V1_API'; hz_party_contact_v2pub.create_org_contact (p_init_msg_list => fnd_api.g_true, p_org_contact_rec => lv_org_contact_rec, x_org_contact_id => lv_org_contact_id, x_party_rel_id => lv_party_rel_id, x_party_id => lv_party_id, x_party_number => lv_party_number, x_return_status => lv_return_status, x_msg_count => lv_msg_count, x_msg_data => lv_msg_data ); -- --Capturing error if not success -- IF lv_return_status <> fnd_api.g_ret_sts_success THEN FOR i IN 1 .. fnd_msg_pub.count_msg LOOP fnd_msg_pub.get (p_msg_index => i, p_encoded => fnd_api.g_false, p_data => lv_msg_data, p_msg_index_out => lv_msg_index_out ); lv_api_message := lv_api_message || ' ~ ' || lv_msg_data; END LOOP; dbms_output.put_line('Error: '||lv_api_message); ELSIF (lv_return_status = fnd_api.g_ret_sts_success) THEN DBMS_OUTPUT.put_line ('***************************'); DBMS_OUTPUT.put_line ('Output information ....'); DBMS_OUTPUT.put_line ('Success'); DBMS_OUTPUT.put_line ('lv_org_contact_id: '||lv_org_contact_id); DBMS_OUTPUT.put_line ('lv_party_id: '||lv_party_id); DBMS_OUTPUT.put_line ('lv_party_rel_id: '||lv_party_rel_id); DBMS_OUTPUT.put_line ('***************************'); END IF; COMMIT; END; /

Step 3: Create the Contact at Account/Site level of the Customer

Input Parameters for below Script:

  1. lv_party_id generated from step 2
  2. cust_account_id if the contact needs to be assigned at account level
  3. cust_acct_site_id if the contact needs to be assigned at site level
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/***********************************************************************
 *PURPOSE: To Create the Contact at Account/Site level of the Customer *
 *AUTHOR: Shailender Thallam                                           *
 ***********************************************************************/
SET define off;
SET serveroutput ON;
 
DECLARE
   p_cr_cust_acc_role_rec   hz_cust_account_role_v2pub.cust_account_role_rec_type;
   lv_api_message           VARCHAR2 (4000);
   lv_msg_index_out         NUMBER;
   x_cust_account_role_id   NUMBER;
   x_return_status          VARCHAR2 (2000);
   x_msg_count              NUMBER;
   x_msg_data               VARCHAR2 (2000);
BEGIN
   -- NOTE:
   -- must be unique CUST_ACCOUNT_ID, CUST_ACCT_SITE_ID, PARTY_ID,ROLE_TYPE
   --
   p_cr_cust_acc_role_rec.party_id := 47904; --<<this is the value of lv_party_id which gets generated from the Step 2>>
   p_cr_cust_acc_role_rec.cust_account_id := 5040; --<<value for hz_cust_accounts_all.cust_account_id of the Organization party>>
   p_cr_cust_acc_role_rec.cust_acct_site_id := 2248; --<<To create contact at site level, if not to create contact at customer levl, we need to comment this line>>
-- p_cr_cust_acc_role_rec.primary_flag := 'Y';
   p_cr_cust_acc_role_rec.role_type := 'CONTACT';
   p_cr_cust_acc_role_rec.created_by_module := 'HZ_CPUI';
   mo_global.init ('AR');
--
   hz_cust_account_role_v2pub.create_cust_account_role
                                                     ('T',
                                                      p_cr_cust_acc_role_rec,
                                                      x_cust_account_role_id,
                                                      x_return_status,
                                                      x_msg_count,
                                                      x_msg_data
                                                     );
   DBMS_OUTPUT.put_line ('***************************');
   DBMS_OUTPUT.put_line ('Output information ....');
   --
   --Capturing error if not success 
   --
   IF x_return_status <> fnd_api.g_ret_sts_success
   THEN
      FOR i IN 1 .. fnd_msg_pub.count_msg
      LOOP
         fnd_msg_pub.get (p_msg_index          => i,
                          p_encoded            => fnd_api.g_false,
                          p_data               => x_msg_data,
                          p_msg_index_out      => lv_msg_index_out
                         );
         lv_api_message := lv_api_message || ' ~ ' || x_msg_data;
      END LOOP;
 
      DBMS_OUTPUT.put_line ('Error: ' || lv_api_message);
   ELSIF (x_return_status = fnd_api.g_ret_sts_success)
   THEN
      DBMS_OUTPUT.put_line ('Success');
      DBMS_OUTPUT.put_line (   'x_cust_account_role_id: '
                            || x_cust_account_role_id
                           );
   END IF;
 
   DBMS_OUTPUT.put_line ('***************************');
   COMMIT;
END;
/

/*********************************************************************** *PURPOSE: To Create the Contact at Account/Site level of the Customer * *AUTHOR: Shailender Thallam * ***********************************************************************/ SET define off; SET serveroutput on; DECLARE p_cr_cust_acc_role_rec hz_cust_account_role_v2pub.cust_account_role_rec_type; lv_api_message VARCHAR2 (4000); lv_msg_index_out NUMBER; x_cust_account_role_id NUMBER; x_return_status VARCHAR2 (2000); x_msg_count NUMBER; x_msg_data VARCHAR2 (2000); BEGIN -- NOTE: -- must be unique CUST_ACCOUNT_ID, CUST_ACCT_SITE_ID, PARTY_ID,ROLE_TYPE -- p_cr_cust_acc_role_rec.party_id := 47904; --<<this is the value of lv_party_id which gets generated from the Step 2>> p_cr_cust_acc_role_rec.cust_account_id := 5040; --<<value for hz_cust_accounts_all.cust_account_id of the Organization party>> p_cr_cust_acc_role_rec.cust_acct_site_id := 2248; --<<To create contact at site level, if not to create contact at customer levl, we need to comment this line>> -- p_cr_cust_acc_role_rec.primary_flag := 'Y'; p_cr_cust_acc_role_rec.role_type := 'CONTACT'; p_cr_cust_acc_role_rec.created_by_module := 'HZ_CPUI'; mo_global.init ('AR'); -- hz_cust_account_role_v2pub.create_cust_account_role ('T', p_cr_cust_acc_role_rec, x_cust_account_role_id, x_return_status, x_msg_count, x_msg_data ); DBMS_OUTPUT.put_line ('***************************'); DBMS_OUTPUT.put_line ('Output information ....'); -- --Capturing error if not success -- IF x_return_status <> fnd_api.g_ret_sts_success THEN FOR i IN 1 .. fnd_msg_pub.count_msg LOOP fnd_msg_pub.get (p_msg_index => i, p_encoded => fnd_api.g_false, p_data => x_msg_data, p_msg_index_out => lv_msg_index_out ); lv_api_message := lv_api_message || ' ~ ' || x_msg_data; END LOOP; DBMS_OUTPUT.put_line ('Error: ' || lv_api_message); ELSIF (x_return_status = fnd_api.g_ret_sts_success) THEN DBMS_OUTPUT.put_line ('Success'); DBMS_OUTPUT.put_line ( 'x_cust_account_role_id: ' || x_cust_account_role_id ); END IF; DBMS_OUTPUT.put_line ('***************************'); COMMIT; END; /

Step 4: Create a Contact Point for the contact person

Input Parameters for below Script:

  1. lv_party_id generated from step 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/************************************************************
 *PURPOSE: To create a Contact Point for the contact person *
 *AUTHOR: Shailender Thallam                                *
 ************************************************************/
SET define off;
SET serveroutput ON;
 
DECLARE
   lv_return_status       VARCHAR2 (500);
   lv_msg_count           NUMBER;
   lv_msg_data            VARCHAR2 (500);
   lv_api_message         VARCHAR2 (4000);
   lv_msg_index_out       NUMBER;
   lv_api_name            VARCHAR2 (150);
   lv_table_name          VARCHAR (150);
   lv_contact_point_id    NUMBER;
   lv_contact_point_rec   hz_contact_point_v2pub.contact_point_rec_type;
   lv_phone_rec           hz_contact_point_v2pub.phone_rec_type;
   lv_email_rec           hz_contact_point_v2pub.email_rec_type;
BEGIN
   lv_contact_point_rec.contact_point_type := 'PHONE';
   lv_contact_point_rec.contact_point_purpose := 'BUSINESS';
   lv_contact_point_rec.created_by_module := 'TCA_V1_API';
   lv_contact_point_rec.status := 'A';
   lv_email_rec.email_format := 'HTML';
   lv_email_rec.email_address := 'shailender@OracleAppsDNA.com';
   lv_phone_rec.phone_area_code := 001;
   lv_phone_rec.phone_number := 567890;
   lv_phone_rec.phone_extension := 1953;
   lv_contact_point_rec.owner_table_name := 'HZ_PARTIES';
   lv_contact_point_rec.owner_table_id := 47904;
               --<< This is the lv_party_id value generated from the Step 2>>
   lv_phone_rec.phone_line_type := 'MOBILE';
   mo_global.init ('AR');
   hz_contact_point_v2pub.create_contact_point
                                (p_init_msg_list          => fnd_api.g_true,
                                 p_contact_point_rec      => lv_contact_point_rec,
                                 p_email_rec              => lv_email_rec,
                                 p_phone_rec              => lv_phone_rec,
                                 x_contact_point_id       => lv_contact_point_id,
                                 x_return_status          => lv_return_status,
                                 x_msg_count              => lv_msg_count,
                                 x_msg_data               => lv_msg_data
                                );
 
   --
   --Capturing error if not success
   --
   IF lv_return_status <> fnd_api.g_ret_sts_success
   THEN
      FOR i IN 1 .. fnd_msg_pub.count_msg
      LOOP
         fnd_msg_pub.get (p_msg_index          => i,
                          p_encoded            => fnd_api.g_false,
                          p_data               => lv_msg_data,
                          p_msg_index_out      => lv_msg_index_out
                         );
         lv_api_message := lv_api_message || ' ~ ' || lv_msg_data;
         DBMS_OUTPUT.put_line ('Error:' || lv_api_message);
      END LOOP;
   ELSIF (lv_return_status = fnd_api.g_ret_sts_success)
   THEN
      DBMS_OUTPUT.put_line ('***************************');
      DBMS_OUTPUT.put_line ('Output information ....');
      DBMS_OUTPUT.put_line ('Success');
      DBMS_OUTPUT.put_line ('lv_contact_point_id: ' || lv_contact_point_id);
      DBMS_OUTPUT.put_line ('***************************');
   END IF;
 
   COMMIT;
END;
/

/************************************************************ *PURPOSE: To create a Contact Point for the contact person * *AUTHOR: Shailender Thallam * ************************************************************/ SET define off; SET serveroutput on; DECLARE lv_return_status VARCHAR2 (500); lv_msg_count NUMBER; lv_msg_data VARCHAR2 (500); lv_api_message VARCHAR2 (4000); lv_msg_index_out NUMBER; lv_api_name VARCHAR2 (150); lv_table_name VARCHAR (150); lv_contact_point_id NUMBER; lv_contact_point_rec hz_contact_point_v2pub.contact_point_rec_type; lv_phone_rec hz_contact_point_v2pub.phone_rec_type; lv_email_rec hz_contact_point_v2pub.email_rec_type; BEGIN lv_contact_point_rec.contact_point_type := 'PHONE'; lv_contact_point_rec.contact_point_purpose := 'BUSINESS'; lv_contact_point_rec.created_by_module := 'TCA_V1_API'; lv_contact_point_rec.status := 'A'; lv_email_rec.email_format := 'HTML'; lv_email_rec.email_address := 'shailender@OracleAppsDNA.com'; lv_phone_rec.phone_area_code := 001; lv_phone_rec.phone_number := 567890; lv_phone_rec.phone_extension := 1953; lv_contact_point_rec.owner_table_name := 'HZ_PARTIES'; lv_contact_point_rec.owner_table_id := 47904; --<< This is the lv_party_id value generated from the Step 2>> lv_phone_rec.phone_line_type := 'MOBILE'; mo_global.init ('AR'); hz_contact_point_v2pub.create_contact_point (p_init_msg_list => fnd_api.g_true, p_contact_point_rec => lv_contact_point_rec, p_email_rec => lv_email_rec, p_phone_rec => lv_phone_rec, x_contact_point_id => lv_contact_point_id, x_return_status => lv_return_status, x_msg_count => lv_msg_count, x_msg_data => lv_msg_data ); -- --Capturing error if not success -- IF lv_return_status <> fnd_api.g_ret_sts_success THEN FOR i IN 1 .. fnd_msg_pub.count_msg LOOP fnd_msg_pub.get (p_msg_index => i, p_encoded => fnd_api.g_false, p_data => lv_msg_data, p_msg_index_out => lv_msg_index_out ); lv_api_message := lv_api_message || ' ~ ' || lv_msg_data; DBMS_OUTPUT.put_line ('Error:' || lv_api_message); END LOOP; ELSIF (lv_return_status = fnd_api.g_ret_sts_success) THEN DBMS_OUTPUT.put_line ('***************************'); DBMS_OUTPUT.put_line ('Output information ....'); DBMS_OUTPUT.put_line ('Success'); DBMS_OUTPUT.put_line ('lv_contact_point_id: ' || lv_contact_point_id); DBMS_OUTPUT.put_line ('***************************'); END IF; COMMIT; END; /


For Further Reading


  1. OPM Quality: API to create Samples and Add Test Results to Samples
  2. SQL Query to find out Duplicate Customer Contacts
  3. SQL Query to find Customer, Customer Account and Customer Sites Information
  4. Script to Update Customer Locations – HZ_LOCATION_V2PUB.UPDATE_LOCATION
  5. API to Purge/Delete Employee from HRMS application
  6. API approach to find On Hand Quantity of an Item
  7. Usage of PL/SQL Collections
Tags:Customer Contact APICustomer Contact Point APICustomer Relationship APIhz_contact_point_v2pubhz_cust_account_role_v2pubhz_party_contact_v2pubhz_party_v2pub

Search on this Site

Popular Questions Asked

  • What is the difference between XML publisher and BI Publisher? asked by Questions Master
  • What is the difference between CASE and DECODE? asked by Questions Master
  • What are the different types of Sales Orders in Order Management? asked by Questions Master
  • Can you have multiple layout templates for a singe data template? asked by Questions Master
  • How to display the names of the employees who earn highest salary in their respective departments? asked by Questions Master

Categories

Recent Posts

  • Oracle ERP Cloud Instance Clone/Refresh Guidelines
  • ESS Request History with Time took to Run
  • Payload to Update AR Invoice DFF in Oracle ERP Cloud
  • Emails generated by Oracle ERP are delivered to customer/Supplier with from email address as “no-reply@oracle.com” instead of no-reply@client-DomainName.com
  • Oracle ERP Cloud SQL Query to find Bank Accounts Associated with a Supplier
OracleAppsDNA.com

OracleAppsDNA.com 2025 | All Posts on this blog are based on the views of the Author. Reproducing of articles without permission is prohibited.