Retrieve Current Dataport ID

FishermanFisherman Member Posts: 456
Question -

Inside of my dataport, is there any system constant, function, or property that I can call to retrieve the Object ID of the currently executing dataport? I'd like to log exceptions to a table with the Dataport ID that originated the exception as one of the fields, but I don't know how to get at it.

Thanks.

Answers

  • FishermanFisherman Member Posts: 456
    Nevermind -

    It's funny how documentation likes to be nonspecific :) (or I like to not pay attention).

    I just ended up doing this...

    ...SUBSTRNO('%1',DATAPORT::"EDI Forecast Import");

    After I read this in the help...
    "As opposed to other development tools, the system uses the ID for reference purposes. So you can use the Name in your code, the system automatically converts the Name to the ID when you compile your C/AL code."


    Decided to give it a shot, and it worked.
Sign In or Register to comment.