web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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

I have the same question (0)
  • Tim Wappat Profile Picture
    5,715 on at

    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.

  • Community Member Profile Picture
    on at

    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.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Dan Liebl Profile Picture

Dan Liebl 2

#2
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans