What would go in first the synthetic grass, then the fence or fence than synthetic grass?
The fence would be the first structure to set up then install the synthetic grass. Installing synthetic grass is a simple procedure that can easily be done if you have a shovel, barrier material as well as herbicide to kill any existing vegetation.
I would put the fence in first, lest the synthetic lawn, already installed, might be damaged in putting up the fence. Especially if you have to bring in a machine to dig the post holes.