Code Unit cannot return DateFormula??

teckpohteckpoh Member Posts: 271
Hi All,
Do u know how to return a data type = DateFormula in codeunit? I notice in codeunit function there we can set a parameter datatype = dateformula BUT in return type(return value) there i can't choose dateformula as my return type.
Any suggestion/advise ...thank a lot~

Answers

  • ara3nara3n Member Posts: 9,256
    Make it a paramater and pass it by reference (tick the Var) in the parameter line.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • teckpohteckpoh Member Posts: 271
    Hi Ara3n,
    i mean at codeunit function->Return Value(tab)->Return Type[there are no such datatype called dateformula]. How to pass the return type as dateformula.
  • ara3nara3n Member Posts: 9,256
    you can't, that's why I suggested to use parameter.
    Or use text, and evaluate back to dateformular.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • teckpohteckpoh Member Posts: 271
    Hi Ara3n,
    Thank for you reply...may i know if i use text how to evaluate it back to dateformula? Thank in advance~
  • idiotidiot Member Posts: 651
    try EVALUATE(yourDateFormulaVar, yourText);
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • teckpohteckpoh Member Posts: 271
    Thank a lot idiot~~ Use EVALUATE function make my thing work successfully~


    Cheer,
    teckpoh
Sign In or Register to comment.