The Word is Murder by Anthony Horowitz

A wealthy woman is found dead six hours after planning her own funeral. A private detective hires a novelist (I wonder who?) to write the story of how he solves the crime. This is another story within a story by Horowitz – it’s funny and clever as was The Magpie Murders.