Microsoft.Dynamics.Ax.Xpp.ErrorException: 'Wrong parameters specified'
DocumentManagement::getAttachmentPublicUrl(DocuRef::findValue(docRef.ValueRecId));
public static List ListAttachments(RefRecId _recId, str _actualCompanyId, TableName _tableName)
{
str receiptUrl;
DocuRef docRef;
List listUrls = new List(Types::String);
IApplicationEnvironment env = EnvironmentFactory::GetApplicationEnvironment();
str currentUrl = env.Infrastructure.HostUrl;
System.Uri currentHost = new System.Uri(currentUrl);
while select docRef
where docRef.RefRecId == _recId
&& docRef.ActualCompanyId == _actualCompanyId
&& docRef.RefTableId == tableName2Id(_tableName)
{
receiptUrl = currentHost.ToString() + DocumentManagement::getAttachmentPublicUrl(DocuRef::findValue(docRef.ValueRecId));
listUrls.addEnd(receiptUrl);
}
return listUrls;
}
public static List ListAttachments(RefRecId _recId, str _actualCompanyId, TableName _tableName)
{
str receiptUrl;
DocuRef docRef;
List listUrls = new List(Types::String);
IApplicationEnvironment env = EnvironmentFactory::GetApplicationEnvironment();
str currentUrl = env.Infrastructure.HostUrl;
System.Uri currentHost = new System.Uri(currentUrl);
while select docRef
where docRef.RefRecId == _recId
&& docRef.ActualCompanyId == _actualCompanyId
&& docRef.RefTableId == tableName2Id(_tableName)
{
receiptUrl = currentHost.ToString() + DocumentManagement::getAttachmentPublicUrl(docRef);
listUrls.addEnd(receiptUrl);
}
return listUrls;
}
Alireza Eshaghzadeh
799
Super User 2025 Season 2
Mohamed Amine Mahmoudi
757
Super User 2025 Season 2
Abhilash Warrier
751
Super User 2025 Season 2