The present application discloses compounds of formula (I) wherein X is ═O, ═S, ═NH, ═NOH and ═NO-Me; A is —C(═O)—, —S(═O)2—, —C(═S)— and P(═O)(R5)—; B is, —O—, —(CH2)3-6—, and O—(CH2)2-5—; D is, —O—, —CR7R8— and —NR9; m is 0-12, n is 0-12, m+n is 1-20; p is 0-4; R1 is opt. sub. heteroaryl; and pharmaceutically acceptable salts thereof, and prodrugs thereof. The application also discloses the compound for use as a medicament for the treatment of a disease or a condition caused by an elevated level of nicotinamide phosphoribosyltransferase (NAMPRT), e.g. inflammatory and tissue repair disorders; dermatosis; autoimmune diseases, Alzheimer's disease, stroke, athersclerosis, restenosis, diabetes, glomerulonephritis, cancer, cachexia, inflammation associated with infection and certain viral infections, including Acquired Immune Deficiency Syndrome (AIDS), adult respiratory distress syndrome, ataxia telengiectasia.