WS extension codeunit

rmm4rmm4 Member Posts: 4
Hello!

I've created an extension codeunit, published it with the same name as page, but the function does not appear in wsdl.
Followed the instructions on msdn.

Then I added one more function and published the same codeunit again, using standard Vendor page - and this function shows up in wsdl.
ye8zatp3wzye.png

This is the codeunit
w1kyr40l6rwj.png

So, any ideas what's wrong with my table/page? Thanks.

Best Answer

Answers

  • KishormKishorm Member Posts: 921
    The first parameter in the functions in the extension codeunit must be the same as the table used on the page you are extending.
  • rmm4rmm4 Member Posts: 4
    Kishorm wrote: »
    The first parameter in the functions in the extension codeunit must be the same as the table used on the page you are extending.
    If you look at the screenshot, you see the first parameter is the same table ("E-Invoice header"). It works with Vendor in function Capitalize(), does not work with my table in function Comment().

  • KishormKishorm Member Posts: 921
    OK, but you didn't say or show us what the source table was on page 50070 - so it was possible that it was different.

    If that's the same then the other thing to check is to make sure that the functions are set as global functions and not local functions in the extension codeunit.
  • rmm4rmm4 Member Posts: 4
    Kishorm wrote: »
    If that's the same then the other thing to check is to make sure that the functions are set as global functions and not local functions in the extension codeunit.
    Thank you and sorry, I forgot the screenshot about page 50070 showing SourceTable property. It really is the same table.

    It's nav 2013 where functions created are not Local by default and I have already checked that too.
    What else could it be?


  • rmm4rmm4 Member Posts: 4
    Oh crap! I thought hyphen might be the reason, but it seemed so unbelievable.
    Anyway, changed the service names to E_Invoice and the extension codeunit function pops up in wsdl :)
    Thanks again.

    I wonder wether it's written somewhere in docs too that you can't use hyphens.
Sign In or Register to comment.