Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2021-07-30 09:07 AM
2021-07-30 09:43 AM
@AlexandrosKras, see how this works.
Try putting this at the very bottom of the layout:
<style>
#dbrn-btn-generate {
background-color: transparent;
margin: 1% 0% 1% 7%;
}
#dbrnalertMsg{
color:#555;
border-radius:10px;
font-family: Tahoma;font-size:12px;
padding:10px 10px 10px 36px;
position: fixed;
top: 0;
left: 0;
height: 1em;
width: 100%;
background-color: #e9ffd9;
z-index: 999;
font-weight:bold;
}
</style>
<script type="text/javascript">
var NOTIFICATIONdatafeedGUID = '8F4CE42D-9BB0-4E6B-B72C-60A2CE64505E';
var ASSESSMENTdatafeedGUID = '931CEA7B-411C-437E-A8F3-AF30CE965B72';
var baseURL = 'https://.../RSAarcher'; // Build the base URL from address bar
Sys.Application.add_load( function() {
if (sessionStorage.getItem("type")=='dbrn') {
document.getElementById("dbrnalertMsg").style.display = "block";
setTimeout( function(){document.getElementById("dbrnalertMsg").style.display = "none";}, 10000);
sessionStorage.removeItem("type");
} else if (sessionStorage.getItem("type")=='dbra') {
document.getElementById("dbraalertMsg").style.display = "block";
setTimeout( function(){document.getElementById("dbraalertMsg").style.display = "none";}, 10000);
sessionStorage.removeItem("type");
}
});
function executedatafeed(feedGUID,type){
var restAPICall = {"DataFeedGuid":feedGUID, "IsReferenceFeedsIncluded":true};
$.ajax({
type: "POST",
url: baseURL+'/api/core/datafeed/execution',
headers: {
'x-csrf-token': (window.sessionStorage) ? window.sessionStorage.getItem("x-csrf-token") : csrfToken = parent.parent.ArcherApp.globals['xCsrfToken']
},
data: JSON.stringify(restAPICall),
contentType: 'application/json',
processData: false,
dataType: 'json',
success: function() {
sessionStorage.setItem("type", type);
$('#master_btnApply').click();},
error: function() {alert("An unexpected error has occurred in the system. Please try your request again. If problems persist, please contact your system administrator")}
});
}
</script>
Then put your buttons where you need it.
<div id="dbrn-toolbar-app-buttons">
<a id="dbrn-btn-capture" href="javascript:void(0);" data-check-dirty="false">
<div id="dbrn-btn-generate" class="tb-btn" data-icon="" data-icon-pos="left" onclick="executedatafeed(NOTIFICATIONdatafeedGUID, 'dbrn');">COPY NOTIFICATION FORM FIELDS TO ASSESSMENT</div>
</a>
</div>
<div id="dbrnalertMsg" style="display:none"><span>SUCCESS: </span>Fields copy process has started successful. Please refresh or recalculate the record.</div>
and
<div id="dbra-toolbar-app-buttons">
<a id="dbra-btn-capture" href="javascript:void(0);" data-check-dirty="false">
<div id="dbra-btn-generate" class="tb-btn" data-icon="" data-icon-pos="left" onclick="executedatafeed(ASSESSMENTdatafeedGUID, 'dbra');">COPY ASSESSMENT FORM FIELDS TO REGISTER</div>
</a>
</div>
<div id="dbraalertMsg" style="display:none"><span>SUCCESS: </span>Fields copy process has started successful. Please refresh or recalculate the record.</div>
Advisory Consultant
2021-07-31 04:41 AM
2021-08-02 09:40 AM
Anything showing up in the browser's developer tools console?
Advisory Consultant
2021-08-02 10:33 AM
Hi there-
I fixed it
It did show for the one feed.
Had to add another section for the second feed success message. at the style customobject.