SBX - Search With Button

SBX - Forum Post Title

Insert a New Record Based on User Click

Microsoft Dynamics NAV Forum

sjen asked a question on 14 May 2019 5:04 PM

Question Status

Suggested Answer

Hello,

I have my page and I added an action button "Allow Cancel" and every time user clicks "allow cancel" It fires a customized report. What I want is whoever clicks "allow cancel" button creates a new record in my log table and shows when. How can I do this?

Thank you

Reply
Teddy Herryanto responded on 14 May 2019 5:32 PM
My Badges
Suggested Answer

Just add the codes in the OnAction button. Can you access the C/AL Editor ?

Reply
zhongyong responded on 19 May 2019 6:04 AM
My Badges
Suggested Answer

Hi,

Allow Cancel - OnAction()
//.....other coding....
REPORT.RUNMODAL('MYReport');
mylogtable.reset;
mylogtable.INIT;
mylogtable."Operation date" := TODAY;
mylogtable."Operation time" := TIME;
mylogtable.UserID = USERID;
//.....other coding....
mylogtable.insert;

Then make a new list page

Reply
Teddy Herryanto responded on 14 May 2019 5:32 PM
My Badges
Suggested Answer

Just add the codes in the OnAction button. Can you access the C/AL Editor ?

Reply
zhongyong responded on 19 May 2019 6:04 AM
My Badges
Suggested Answer

Hi,

Allow Cancel - OnAction()
//.....other coding....
REPORT.RUNMODAL('MYReport');
mylogtable.reset;
mylogtable.INIT;
mylogtable."Operation date" := TODAY;
mylogtable."Operation time" := TIME;
mylogtable.UserID = USERID;
//.....other coding....
mylogtable.insert;

Then make a new list page

Reply

SBX - Two Col Forum

SBX - Migrated JS