Hi,
I wrote a trigger to update the EFT fields during cash receipt. The trigger works but when I post the RM Batch I receive the batch error 'Object has no reference". I ran the grant script but this did not resolve the problem.
Suggestions anyone? The trigger is below.
Thank you,
Donnette
/****** Object: Trigger [dbo].[palbInvc_EFTFlagUpdate] Script Date: 5/10/2017 1:55:25 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: DONNETTE SPENCER,
-- Create date: 05/04/2017
-- Description: UPDATE RMCASH APPS TABLE EFT FLAG =1= WHEN LOCKBOX PAYMENT IS APPLIE TO A CUSTOMER ACCOUNT
-- =============================================
CREATE TRIGGER [dbo].[palbInvc_EFTFlagUpdate] ON [dbo].[palbInvc]
AFTER INSERT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here to update eft flag in the RM10201 table
Update
R SET R.EFTFLAG = '1'
FROM RM10201 R
inner join [palbInvc] LB ON R.DOCNUMBR = LB.[DOCNUMBR]
--WHERE LB.[CUSTNMBR] <> ''
Update
R SET R.TRXDSCRN = 'EFT TRANSACTION'
FROM RM10201 R
inner join [palbInvc] LB ON R.DOCNUMBR = LB.[DOCNUMBR]
WHERE R.EFTFLAG = '1'
END
*This post is locked for comments