Skip to main content
Business Central forum
Suggested answer

Report for adding code in existing procedure/ trigger custom field in the code of process report

editSubscribe (2) ShareShare
ReportReport
Posted on by 14
Hi  ,
 
I have custom field  XY in  /Bank Acc. Reconciliation Line/. when I want to transfer to /Gen. Journal Line/ which has custom field X.
there is a report to insert data into /Gen. Journal Line/ from  /Bank Acc. Reconciliation Line/. report name is  /Trans. Bank Rec. to Gen. Jnl./
 
how to add code like this /Gen. Journal Line/ .xy:= /Bank Acc. Reconciliation Line/.xy.
 
please give me hint.
 
Warm regards
  • Community member Profile Picture
    Community member 22 on at
    Report for adding code in existing procedure/ trigger custom field in the code of process report

    To transfer the custom field value from the /Bank Acc. Reconciliation Line/ table to the /Gen. Journal Line/ table in the report "Trans. Bank Rec. to Gen. Jnl.", you'll need to customize the code of the report.

    Here's a hint to guide you:

    Inside the "Trans. Bank Rec. to Gen. Jnl." report code, locate the section where it processes each record from /Bank Acc. Reconciliation Line/ and inserts data into /Gen. Journal Line/.

    Within this section, after the data from the /Bank Acc. Reconciliation Line/ has been processed and before it's inserted into /Gen. Journal Line/, you'll need to add code to transfer the value of custom field XY.

    Utilize the appropriate syntax for accessing custom fields in the code. Depending on the programming language and platform you're working with, this syntax may vary.

    Typically, it involves referencing the field by its name, preceded by the table name. Assign the value of /Bank Acc. Reconciliation Line/.XY to /Gen. Journal Line/.XY.

    The exact syntax for this assignment will depend on the programming language or scripting language you're using. Test your code thoroughly to ensure that the custom field values are transferred accurately from /Bank Acc.

    Reconciliation Line/ to /Gen. Journal Line/ for each record processed by the report. If you encounter any specific issues or need further assistance with the code, feel free to provide more details, and I can offer additional guidance.

  • Community member Profile Picture
    Community member 14 on at
    Report for adding code in existing procedure/ trigger custom field in the code of process report
    Hi ZHU, BR,
     
    Thank you for the support and that too right help.
    You are great  and hope best for you
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 59,978 Super User on at
    Report for adding code in existing procedure/ trigger custom field in the code of process report
    Hi, I just did a simple test, I hope the following information can also give you some help.
     
    Thanks
    ZHU
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 2,716 Super User on at
    Report for adding code in existing procedure/ trigger custom field in the code of process report
    Hi
    In the report there is an event that you can subscribe to to add some more fields.
     
    BR
    GR

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,066 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,585 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans