You mention in your post, installing "triplex" from the service to this building. Did you connect to a grounding electrode, such as waterpipe(if available) or a ground rod? If so, did you bond the grounding electrode conductor, the grounded conductor and the equipment ground conductor together (as you would at the service)?
If there is a waterpipe the comes from the building where the service is located, then you cannot install as explained above, and you will need to have "quadplex" installed with the connection to the panel mentioned treated like a subpanel.


Pierre Belarge