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

Good Day, I am using this code snip, however, I am getting a core dump deep inside geant4 kernel:

G4ElectricField* electrical_field = new G4UniformElectricField( G4ThreeVector(0., 1.0e5kilovolt/cm, 0.) );
G4FieldManager
field_manager = new G4FieldManager( electrical_field );
scintillator_logicalVolume->SetFieldManager( field_manager, true);

I suspect more code would be needed. I am not sure if you can get away without declaring a stepper or grabbing the singleton instance of the field manager pre-11.3 i.e.:

G4FieldManager field_manager = new G4FieldManager( electrical_field );

instead of

G4FieldManager fieldManager= G4TransportationManager::GetTransportationManager()->
                                            GetFieldManager();

In either case, what about trying the cookbook in the user manual?