Announcements
No record found.
hi all i have attached document to docuref table...
but i i open attachment it showing error document not attached...
do i need to update the docvalue table?
*This post is locked for comments
if you are attaching through code, refer below link and see what you are doing wrong.
microsoftdax.blogspot.com/.../x-code-for-document-attachement-in-ax.html
hi mr.sukruth thanks for immediate response i attaching through code only have look
DocuRef docuRef,docurefUpdt;
DocuValue docuvalue,docuvalueUpdt;
docuRef.clear();
docuRef.RefRecId = itemcreationline.RecId;
docuRef.RefTableId = tableNum("ItemCreationLine");
docuRef.RefCompanyId = curext();
docuRef.Name =_name; // document path name
docuRef.TypeId = 'File';
docuRef.insert();
docuvalue.initValue();
docuvalue.insert();
select forUpdate docurefUpdt where docurefUpdt.RecId == docuref.RecId;
if(docurefUpdt)
{
docurefUpdt.ValueRecId = docuvalue.RecId;
docurefUpdt.update();
}
select forupdate docuvalueUpdt where docuvalueUpdt.recid == docuvalue.RecId;
if(docuvalueUpdt)
docuvalue = docuvalue::writeDocuValue(docuref,_name);
file attaching when click open document it is giving error
if i copy that path and paste it in run i can able to see the document..what is the issue i am not getting
Did you try the link suggested in the above blog ?
no
You can call this method where you have written custom code. Method implementation can be done in class and you can call It where you want to attach document
Did you check AOS user has access to that shared folder ?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CP04-islander 26
imran ul haq 8
André Arnaud de Cal... 4 Super User 2026 Season 1