when the function is called.

basic0220basic0220 Posts: 21Member
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 Posts: 36Member
    code function have parameter , you need to pass that parameter.
    please share your code function screenshot
  • basic0220basic0220 Posts: 21Member
    code function have parameter , you need to pass that parameter.
    please share your code function screenshot

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

    but instead i got this.

    xyfi2fpcy05d.png


  • NavSolutionNavSolution Posts: 36Member
    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 Posts: 464Member
    you should probably use GenJnlPostBatch.RUN instead of Code
Sign In or Register to comment.