when the function is called.

basic0220basic0220 Member Posts: 43
HI Guys.
I'm trying to edit Codeunit 231 (Gen. Jnl.-Post)
it's for replicating the Preview G/L entries.

BTW I'm using Nav 2018 11.0.19394

I'm getting this error message then i'm trying to write

"IF NOT CODE THEN BEGIN"

k1tqosvpidcq.png

I don't quite understand this error

thank you for who's gonna answer

Answers

  • NavSolutionNavSolution Member Posts: 36
    code function have parameter , you need to pass that parameter.
    please share your code function screenshot
  • basic0220basic0220 Member Posts: 43
    code function have parameter , you need to pass that parameter.
    please share your code function screenshot

    02a053ip6ith.png
  • NavSolutionNavSolution Member Posts: 36
    IF condition work with Boolean Return value TRUE or FALSE
  • KarenhKarenh Member Posts: 209
    The requireed parameter is GenJnlLine. So the line needs to be
    If Not Code(GenJnlLine) Then BEGIN
  • basic0220basic0220 Member Posts: 43
    I Tried This
    Karenh wrote: »
    If Not Code(GenJnlLine) Then BEGIN

    but instead i got this.

    xyfi2fpcy05d.png


  • NavSolutionNavSolution Member Posts: 36
    edited 2018-06-07
    solution:
    step1: create new function same as code , name it Code123(Any) -Just copy code function and paste it and change name.

    step2:goto code123 locals ,in Return Tab select return type Boolean.

    step3:use this code-If Not Code123(GenJnlLine) Then BEGIN
  • lubostlubost Member Posts: 623
    you should probably use GenJnlPostBatch.RUN instead of Code
Sign In or Register to comment.