Some important function which used in axapta

Get current user id
str s;
  ;
  s = curuserid();
  print "Current user ID is " + s;
  pause;


Field id to field Name
str name;
  tableid _tableId;
  fieldid _fieldid;
  ;

  _tableId = tablename2id("Address");
  _fieldId = fieldname2id(_tableId, "Name");
  name = fieldid2pname(_tableId, _fieldid);
  print name;
  pause;

To get next month of given date
  date d;
      ;
      d = nextmth(today()); //For example, NextMth(29\02\1996) returns the date '29\03\1996', but NextMth(31\01\1996) returns the date '29\02\1996' (leap year).
      print "Next month is " + date2str(d, 2, 2, -1, 2, -1, 4); 
      pause;


To delete string from string
str s;
  ;
  s = strdel("TESTstring", 5, 6);
  print s;
  pause;

Find string using strfind
int i;
  ;
  i = strnfind("test", "s", 3, 4);
  print "i = " + int2str(i);


scan string from string using strscan
int i;
  ;
  i = strscan("Teststring", "string", 4, 6);
  print "i = " + int2str(i);
  pause;