Electrical Box In Cabinet
#1

I have a situation where I would like to mount an electrical box with an outlet and a switch in a small cabinet. The power for the box would come from a wall outlet via a short electrical cord (110 volt line). I am familiar with electrical work but I have never done this before. What I would like to know if it is a safe procedure to do? Thank You.
#2
It's okay, as long as by "electrical cord" you mean properly sized, installed, secured and protected NM cable, and as long as the circuit is grounded, and as long as the circuit is not restricted (e.g., kitchen, bathroom, or other dedicated circuit), and as long as this doesn't overload the circuit.
So in general this is okay. Whether or not it is okay for your situation in particular depends on many details not in evidence.
So in general this is okay. Whether or not it is okay for your situation in particular depends on many details not in evidence.