'The expression Record cannot be type-converted toaCodevalue

e.vidale.vidal Member Posts: 11
Firt al all, sorry but my english is not good...

'The expression Record cannot be type-converted to a Code value.'
This one is the mistake that goes out for me after Cronus España installs the Nav 4.0 sp2 in the base of information of tests and on having entered the orders or on having entered the offers.
I can do neither orders nor offers because it gives me this mistake and it me pulls the screen. Yet I have not done anything to report of to introduce a client.

In opened Orders another mistake goes out for me when the client introduces 10000 (or any other one):
'Reference to the member Block of the variable could not be solved'.

Then I have created another company and have formed it and when I am going to introduce offers / orders he(she) says the same thing to me...

any idea?

Thanks and regards
eli

Comments

  • diptish.naskardiptish.naskar Member Posts: 360
    No matter how many companies you create you will get the same error. Use the debugger to check the exact location of the error. This kind of error is generally thrown when you are using are using a variable in the program but have not defined the same properly or the reference to the variable is not found.
    Diptish Naskar
    For any queries you can also visit my blog site: http://msnavarena.blogspot.com/
  • WaldoWaldo Member Posts: 3,412
    Can you try to compile all (involved) objects?

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • e.vidale.vidal Member Posts: 11
    Hi,

    I use the debugger to check the exact location of the error:

    Codeunit 7171 Sales Info-Pane Management

    In Function: CustCommentExists(CustNo)
    ...
    EXIT(Cust.Comment); ---> ERROR!!!!


    Break On Error.
    The source code is not available.

    Yes, I can compile all (involved) objects. But it's over...

    any other idea?

    Thanks and regards
    eli
  • diptish.naskardiptish.naskar Member Posts: 360
    e.vidal wrote:
    Hi,

    Codeunit 7171 Sales Info-Pane Management

    In Function: CustCommentExists(CustNo)
    ...
    EXIT(Cust.Comment); ---> ERROR!!!!


    Break On Error.
    The source code is not available.

    Yes, I can compile all (involved) objects. But it's over...
    any other idea?

    Thanks and regards
    eli

    Hi eli,

    Have you customized something in the customer area or in the info pane management? I was not able to get the point.....But its over....do please let us know, whether you got any objects marked after you had run the compilation of the related objects.
    Diptish Naskar
    For any queries you can also visit my blog site: http://msnavarena.blogspot.com/
  • David_CoxDavid_Cox Member Posts: 509
    e.vidal wrote:
    Hi,

    I use the debugger to check the exact location of the error:

    Codeunit 7171 Sales Info-Pane Management

    In Function: CustCommentExists(CustNo)
    ...
    EXIT(Cust.Comment); ---> ERROR!!!!


    Break On Error.
    The source code is not available.

    Yes, I can compile all (involved) objects. But it's over...

    any other idea?

    Thanks and regards
    eli

    Is there something wrong with the call or the return, are you sending a code 20 and returning a Boolean?

    The function code should read something like
    Cust.GET(CustNo);
    Cust.CALCFIELDS(Comment);
    EXIT(Cust.Comment);

    This schould be called as
    IF CustCommentExists(Customer."No.")THEN
    Some code

    It looks like the Function is being called with a record and not a code value

    IF CustCommentExists(Customer)THEN
    Some code

    Giving the Message: 'The expression Record cannot be type-converted to a Code value.'

    David
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
Sign In or Register to comment.