code: public static String getContextObjectId()
      {
          ServiceContext context = (ServiceContext) _localContext.get();
  
          if (context != null)
              return context._objectId;
          else
              return null;
      }
docs: Returns the object id, corresponding to the ?id= of the URL.