Set a local uniform electric field

Dear Geant4 users and experts,
I have a simple geometry: 2 boxes in series, one is filled with air and the other is silicon and I use the second one as a detector. My goal is to introduce a local uniform electric field in the first box.
I’m trying to copy the examples in extended/field but my code doesn’t work. Do you have any advice?
Thank you for your help.

dear 01Lewis
I have the same problem,have you solved the problem? if you hane some experience ,I want to ask you advice,thank in advance