I want to log history on the ‘Notes’ in Customer Master ‘Invoice’ Tab. I can’t seems to be successful. Any ideas how to get these Notes in History Log Please. IFS8
So far i logged history on tables, 'IDENTITY_INVOICE_INFO_TAB' ,'FIN_NOTE_TEXT_TAB','IDENTITY_NOTE_TAB'
IDENTITY_NOTE_TAB does not seems to work. any ideas how can i get customer number, and latest update on note from history_log_tab , history_log_attribute_tab tables
Best answer by dhlelk
OrangeCloud wrote:
Here is what my query and results looks like, Can someone help me fixing this so i can get Customer no with these Notes to make this report readable.
SELECT h.time_stamp Date_Change,client_sys.Get_Key_Reference_Value(h.keys,'IDENTITY')Cust_No,h.username,hla.old_value,hla.new_value,h.history_type from history_log_tab h, history_log_attribute_tab hla where h.TABLE_NAME in( 'IDENTITY_INVOICE_INFO_TAB','FIN_NOTE_TEXT_TAB','IDENTITY_NOTE_TAB') and (keys like'%IDENTITY=90073356%'or keys like'NOTE_ID%') and hla.log_id = h.log_id order by h.log_id;
The notes will be saved on fin_note_text_tab table and the relevant note_id for a specific customer record will be saved on identity_note_tab table.
Therefore you may use the following query,
SELECT a.*
FROM fin_note_text_tab a
WHERE a.note_id = (SELECT b.note_id
FROM identity_note_tab b
WHERE b.company = '&company'AND b.identity = '&identity'AND b.party_type = 'CUSTOMER')
;
Thanks @dhlelk , I am looking for getting history log on these Notes.. identity_note_tab is not coming up with a note_id when i add/edit a note in the existing Notes list in an account..
Here is what my query and results looks like, Can someone help me fixing this so i can get Customer no with these Notes to make this report readable.
SELECT h.time_stamp Date_Change,client_sys.Get_Key_Reference_Value(h.keys,'IDENTITY')Cust_No,h.username,hla.old_value,hla.new_value,h.history_type from history_log_tab h, history_log_attribute_tab hla where h.TABLE_NAME in( 'IDENTITY_INVOICE_INFO_TAB','FIN_NOTE_TEXT_TAB','IDENTITY_NOTE_TAB') and (keys like'%IDENTITY=90073356%'or keys like'NOTE_ID%') and hla.log_id = h.log_id order by h.log_id;
Here is what my query and results looks like, Can someone help me fixing this so i can get Customer no with these Notes to make this report readable.
SELECT h.time_stamp Date_Change,client_sys.Get_Key_Reference_Value(h.keys,'IDENTITY')Cust_No,h.username,hla.old_value,hla.new_value,h.history_type from history_log_tab h, history_log_attribute_tab hla where h.TABLE_NAME in( 'IDENTITY_INVOICE_INFO_TAB','FIN_NOTE_TEXT_TAB','IDENTITY_NOTE_TAB') and (keys like'%IDENTITY=90073356%'or keys like'NOTE_ID%') and hla.log_id = h.log_id order by h.log_id;
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.