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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Cross Dictionary - Database Trigger

(1) ShareShare
ReportReport
Posted on by

Hi,

I am trying to delete the record from my custom table once the record got deleted from FA00905 (FA_GL_Interface_WORK) table for a particular Batch No.

Code,

Startup:

result = Trigger_RegisterDatabaseByName(309, "FA_GL_Interface_WORK", "", TRIGGER_ON_DB_DELETE, script TSS_DBDELETE);
if result <> SY_NOERR then
 warning "Database trigger registration failed.";
 warning str(result);
end if;

TSS_DBDELETE:

inout anonymous table 'TS_Table';
warning "delete trigger.";

release table TSS_OBS_DistUserCntrl;
'Batch Number' of table TSS_OBS_DistUserCntrl = column("GL Interface Batch Number") of table 'TS_Table';
change table TSS_OBS_DistUserCntrl by number 1;
if err() = OKAY then
 remove table TSS_OBS_DistUserCntrl;
end if;

The Trigger is registered successfully. It Looks like the script is not getting fired. I didn't get that warning message. 

Can anyone help me on this?

Thanks,

Islam

 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Islam,

    Since it is a third party dictionary, use execute() function to process the above scripts.

    You can refer the execute function syntax with examples at dex.chm or GP Integration guide in Dexterity installation folder.

  • Community Member Profile Picture
    on at

    Hi Nataraj,

    I am trying to delete the record in my custom table, not in FA table. Can you please look on Trigger_RegisterDatabaseByName() function in FUNCTLIB.pdf?

    Thanks,

    Islam

  • Community Member Profile Picture
    on at

    Hi Islam,

    By noticing the product number, i guess as a cross dictionary trigger, can you stepping through this? make sure the range was properly set.

    can you try with range table statement to get the current range in table buffer before the delete operation?

  • soma Profile Picture
    24,410 on at

    use the below line instead of your first line code.

    inout anonymous table 'FA_GL_Interface_WORK';

    Note: we need to pass the triggered table for the inout parameter of our first line code.

    Hope this helps!!!

  • Community Member Profile Picture
    on at

    Yeah the range is correct. I used the same range to edit()/change() the record. I didn't get the warning message too in the second line of my script.

    Thanks,

    Anvar

  • Community Member Profile Picture
    on at

    Tried out. No luck.

    Thanks,

    Isalm

  • Suggested answer
    soma Profile Picture
    24,410 on at

    I hope you have wrote the code for one of the Fixed Asset table. If so, please use the product code as 54 for Fixed Asset module.

    Note: For your reference, please have a look on the below link for product and module references.

    dyndeveloper.com/DynModule.aspx

    Hope this helps!!!

  • Community Member Profile Picture
    on at

    The 54 is table count in FA module. The Product ID of the FA is 309. Please refer the Dynamics.SET file or below link.

    dynamicsgp.wordpress.com/.../dynamics-set-list-of-dynamics-gp-products

    Thanks,

    Islam

  • soma Profile Picture
    24,410 on at

    Sorry I misunderstanding the table reference between ID and count.

  • soma Profile Picture
    24,410 on at

    Have you checked whether the data is properly deleted from the table FA_GL_Interface_WORK?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans