dear all
i found the following code which simulates the attachment field, and it work fine.
the only problem is that i need to show the file name next to the button when uploading finishes.
any idea how to do it?
<html><head>
<style>
.button {
background-color: 00bfff;
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 10px;
cursor: pointer;
border-radius: 6px;
background-color: #ff0054;
}
</style>
<script>
function Addattachment()
{
var entityETC=10007; //entity code
var entityID =window.parent.Xrm.Page.data.entity.getId();//to read parent record ID
parent.Mscrm.RibbonActions.addFileToRecord(3, entityID) ;
}
</script>
<meta charset="utf-8"><meta><style type="text/css">P { margin: 0; }</style><meta><style type="text/css">P { margin: 0; }</style><meta><style type="text/css">P { margin: 0; }</style><meta></head>
<body style="overflow-wrap: break-word; word-wrap: break-word;" onfocusout="parent.setEmailRange();">
<button class="button" onclick="Addattachment()">Attach</button>
</body></html>
*This post is locked for comments