Please visit the link to get the solution: [Hide Button if Document is not Saved in ERPNext - BYTES GENIUS]