public static void main(Args _args)
{
DocuRef docuReference;
DocuValue docuValue;
DocuAction docuActionClass;
str url;
Browser br = new Browser();
docuReference = DocuRef::find(curExt(), RefRecId) // select the DocuRef table buffer record.
if(docuReference)
{
docuValue = docuReference.docuValue();
url = docuValue.Path;
if (!url || docuValue.Type == DocuValueType::Others)
{
str accessToken = DocumentManagement::createAccessToken(docuReference);
url = Microsoft.Dynamics.AX.Framework.FileManagement.URLBuilderUtilities::GetDownloadUrl(docuValue.FileId, accessToken);
}
if(url)
{
br.navigate(url, false, false); // This code is used to download the file from browser.
}
{
DocuRef docuReference;
DocuValue docuValue;
DocuAction docuActionClass;
str url;
Browser br = new Browser();
docuReference = DocuRef::find(curExt(), RefRecId) // select the DocuRef table buffer record.
if(docuReference)
{
docuValue = docuReference.docuValue();
url = docuValue.Path;
if (!url || docuValue.Type == DocuValueType::Others)
{
str accessToken = DocumentManagement::createAccessToken(docuReference);
url = Microsoft.Dynamics.AX.Framework.FileManagement.URLBuilderUtilities::GetDownloadUrl(docuValue.FileId, accessToken);
}
if(url)
{
br.navigate(url, false, false); // This code is used to download the file from browser.
}
Hi Hussain, How are you, Hope you remember me .
ReplyDeleteI have a small query on the above query can you help me