add "Last Modified" column to creditor contacts

Discussions relating to plugin development, and the Jiwa API.

add "Last Modified" column to creditor contacts

Postby pricerc » Thu Mar 05, 2020 1:18 pm

I'm wanting to add a "Last Modified" column to the contacts grid in Creditors.

Adding the column is easy enough. But I can't figure out the trick to then populate it from the contacts when they're displayed?
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: add "Last Modified" column to creditor contacts

Postby Mike.Sheen » Thu Mar 05, 2020 3:50 pm

pricerc wrote:I'm wanting to add a "Last Modified" column to the contacts grid in Creditors.

Adding the column is easy enough. But I can't figure out the trick to then populate it from the contacts when they're displayed?


You need to add handlers for all the cases where the grid is normally displayed (read end, contact name added, and so on). It's a bit of a pain but it's not that bad.

So, in your FormPlugin class Setup method, add handlers for:

  • creditorForm.Creditor.ReadEnd
  • creditorForm.Creditor.CopyEnd
  • Creditor.ContactNames.Added
  • creditorForm.Creditor.ContactNames.Changed

And in there you'll need to find which row in the grid you want using the column with a key of "Key" matching the RecID of the Contact Name, and then you can set the contents of your "Last Modified" cell.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755


Return to Technical and or Programming

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron