Posts

Showing posts from 2025

D365 F&SCM - Get the Azure Attachment Document URL via X++

Image
 Problem Statement:            The user requires that all invoice-related document attachments be accessible from a single location within the voucher transaction window. Based on their needs, the user should be able to view each document by clicking on its corresponding hyperlink. Fix: Introduce one display method for fixing this requirement.  Step 1: Add a single-line text box to the existing voucher transaction window. (FormStringControl:  DocValue_AccessInformation )   Step 2: Use the COC to get the document location. [ExtensionOf(tableStr( GeneralJournalEntry ))] internal final class GeneralJournalEntry_Extension {           [SysClientCacheDataMethod(true)]           display Str1260 displayVendorTransactionAttachment()           {               DocuValue           docu...

D365FO - X++ View | Assign value to String Computed Column in X++ View

Image
 1. Create a view.  2. Add new field in the customize view. 3. Go to Property >> View Method >> Initially No Method will shown. 4. Go to Methods >> Right Click >> New Method. 5. Write the following X++ code to assigning the value to newly added view field.  public static server  str getValue() { return SysComputedColumn::returnField(viewstr( XXX View Name ) ,identifierStr( YYY DataSource Name ),fieldStr( YYY DataSource Name , ZZZ Field Name )); } Note : Target field's  view (XXX), data source(YYY) and field(ZZZ)  name need to replace in the red color Highlighted 6. Build and Synchronize the database.  7. Select the Newly added field and Go to the Property >> View Method >> .Dropdown and Select the newly created method  getValue(). 8. Build the Project once again. NOTE: if you are facing any issue, you can verify the input value from SQL Trace.