Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Trigger Error Object Has No Reference

(0) ShareShare
ReportReport
Posted on by

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

  • Community Member Profile Picture
    on at
    RE: Trigger Error Object Has No Reference

    The business uses the Lock Box process to record EFT payments only, therefore they want the EFT box always checked and the description updated. I will try your suggestion.

  • Tim Wappat Profile Picture
    5,703 on at
    RE: Trigger Error Object Has No Reference

    Your trigger seems to be a bit aggressive - updating everything no matter what has changed.

    I'd expect to see a join with

    UPDATED

    or

    DELETED

    ?

    I don't know the data flow for this business operation so can't comment more.

    Tim.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans