Q: How at target element in View from Util in SAPUI5 I want to show/hide elements in the view from a function inside a util.
I have tried,
// check if editing Promotion
if(oUtil._sId === "Promotion"){
    var getActiveView = this.getView().byId("mainPageId");
    getActiveView.byId("btnSaveEditPromotions").setVisible(true);
    getActiveView.byId("btnCancelEditPromotions").setVisible(true);
}

and also 
// check if editing Promotion
if(oUtil._sId === "Promotion"){
    var getActiveView = sap.ui.getCore().getView().byId("mainPageId");
    getActiveView.byId("btnSaveEditPromotions").setVisible(true);
    getActiveView.byId("btnCancelEditPromotions").setVisible(true);
}

But neither work. oUtil.sId does equal "Promotion", it is failing on getActiveView

A: Best bet is to use json model to hide / show elements on the view. When you navigating to the view trigger sap.ui.getCore().getEventBus().publish event to call function in that view. 
You need to defined the  sap.ui.getCore().getEventBus().subscribe() in the view from where you navigating to the new view where you need to show / hide elements
In sap.ui.getCore().getEventBus().publish event you can pass context which can be used to define your json model which is used to show / hide elements 
Paste your sample code and then I can suggest changes
