The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT *
FROM csf_m_mail_recipients_inq
WHERE tranid$$ = b_tranid
AND clid$$cs = b_user_name;
This procedure is called by APPLY_CLIENT_CHANGES when an inserted record is to be processed.
***/
PROCEDURE APPLY_INSERT
(
p_record IN c_mail_recipients%ROWTYPE,
p_error_msg OUT NOCOPY VARCHAR2,
x_return_status IN OUT NOCOPY VARCHAR2
) IS
BEGIN
-- Insert in this table is not to be
-- transfered to CRM table. Therefore discard all inserts and report OK.
x_return_status := FND_API.G_RET_STS_SUCCESS;
END APPLY_INSERT;
This procedure is called by APPLY_CLIENT_CHANGES when an inserted record is to be processed.
***/
PROCEDURE APPLY_UPDATE
(
p_record IN c_mail_recipients%ROWTYPE,
p_error_msg OUT NOCOPY VARCHAR2,
x_return_status IN OUT NOCOPY VARCHAR2
) IS
-- Make the cursor generic to avoid defining several.
cursor c_notification_attributes
( b_notification_id number
, b_flag_name varchar2
)
is
select wna.notification_id
, wna.name
, wna.text_value
, wna.number_value
, wna.date_value
from wf_notification_attributes wna
where wna.notification_id = b_notification_id
and wna.name = b_flag_name;
if p_record.delete_flag is not NULL
then
-- Check if the flag exists
open c_notification_attributes
( p_record.notification_id
, 'DELETE_FLAG'
);
, 'DELETE_FLAG'
);
, 'DELETE_FLAG'
, p_record.delete_flag
);
fnd_msg_pub.Add_Exc_Msg( g_object_name, 'APPLY_UPDATE', sqlerrm);
CSM_UTIL_PKG.log( 'Exception in ' || g_object_name || '.APPLY_UPDATE:'
|| ' for PK ' || p_record.NOTIFICATION_ID,'CSM_MAIL_RECIPIENTS_PKG.APPLY_UPDATE',FND_LOG.LEVEL_EXCEPTION );
END APPLY_UPDATE;
APPLY_INSERT
(
p_record,
p_error_msg,
x_return_status
);
APPLY_UPDATE
(
p_record,
p_error_msg,
x_return_status
);
( 'Delete is not supported for this entity'
|| ' for PK ' || p_record.notification_id,'CSM_MAIL_RECIPIENTS_PKG.APPLY_RECORD',FND_LOG.LEVEL_ERROR );
a fast sync. This procedure will insert the data that came from mobile into the backend tables using
public APIs.
***/
PROCEDURE APPLY_CLIENT_CHANGES
(
p_user_name IN VARCHAR2,
p_tranid IN NUMBER,
p_debug_level IN NUMBER,
x_return_status IN OUT NOCOPY VARCHAR2
) IS
l_process_status VARCHAR2(1);
/*** Yes -> delete record from inqueue ***/
CSM_UTIL_PKG.DELETE_RECORD
(
p_user_name,
p_tranid,
r_mail_recipients.seqno$$,
r_mail_recipients.notification_id,
g_object_name,
g_pub_name,
l_error_msg,
l_process_status
);
/*** was delete successful? ***/
IF l_process_status <> FND_API.G_RET_STS_SUCCESS THEN
/*** no -> rollback ***/
CSM_UTIL_PKG.LOG
( 'Deleting from inqueue failed, rolling back to savepoint'
|| ' for PK ' || r_mail_recipients.notification_id ,'CSM_MAIL_RECIPIENTS_PKG.APPLY_CLIENT_CHANGES',FND_LOG.LEVEL_ERROR); -- put PK column here
/*** Record was not processed successfully or delete failed -> defer and reject record ***/
CSM_UTIL_PKG.LOG
( 'Record not processed successfully, deferring and rejecting record'
|| ' for PK ' || r_mail_recipients.notification_id,'CSM_MAIL_RECIPIENTS_PKG.APPLY_CLIENT_CHANGES',FND_LOG.LEVEL_ERROR ); -- put PK column here