Quantcast
Channel: Microsoft Dynamics Ax
Viewing all articles
Browse latest Browse all 181

Know line numbers in X++ code

$
0
0

The following X++ code sample shows the behavior of the #linenumber directive.
static void LinenumberPhysicalJob(Args _args)
{
;
#define.Debug(light)

#if.Debug
info("Physical Line 8: # linenumber == "
+ int2Str(#linenumber));
#endif

/****************** Actual Infolog output
Message (08:55:26 pm)
Physical Line 8: # linenumber == 8
******************/
}

If you want to know function and line number you can use (in batch job also):

error(funcName()+' - '+"@GLS103859"+": "+int2Str(#linenumber));


Viewing all articles
Browse latest Browse all 181

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>