Hi experts,
I have added a new BLOB field using Table Extension and added the field in page using Page Extension. But the field displays as read only.
I would like to display it like a BLOB field present in Sales Order page.
I assume I need to add some additional code to handle BLOB fields in Table extension and Page Extension. But couldn't find any step by step documentation or sample code to give me a clue.
Also if you could guide me on steps I need to take to add the BLOB field to a report dataset, that would be helpful.
Is there any other place to look for help or sample code, other than Official Dynamics Business Central documentation which seems to cover very basic coding examples and syntax's. I am starting my MS journey with Business Central.
Thanks,
Amar
Thank you guys for your support. Amar
Hi Amar,
Sorry was away from system when i was replying to you, so i couldn't describe it fully as done by Nissay Halas Tia.
Try the below steps:
Create a Group - "Work Description" and under that Add the WorkDescription Variable and set the following properties.
1. ShowCaption = false
2. MultiLine = true // This will increase the height as in the Sales Order Page
Note: You can still view the existing code from C/Side if you have installed the BC via Docker with includeCSide switch.
Thank you guys for your reply. I was aware of GetWorkDescription, SetWorkDescription, CREATEINSTREAM and CREATEOUTSTREAM. What I didnt know was how and where to use them.
So thanks for the main clue that The Work Description you see in the Sales Order Page is not a BLOB but a variable of type text declared as a global variable.
Now I am able to display this global variable as a normal text field, but not able to adjust it's RowSpan. When I check the documentation (link), it says RowSpan not supported in BC web client, so I am not sure how to increase the height of the work description field. Any suggestions please...
I want to display the work description field just like its displayed in Sales Order
Many thanks,
Amar
Hi Amar,
You cannot read text that is stored in BLOBs in a page directly and you cannot also write text directly in a BLOB field. This can be made only by creating input and output streams (with CREATEINSTREAM and CREATEOUTSTREAM functions).
The Work Description you see in the Sales Order Page is not a BLOB but a variable of type text declared as a global variable (behind there is the function GetWorkDescription that reads text from the Work Description BLOB field of the Sales Header table and assign the text value to the the global text variable WorkDescription that you see in the Sales Order page layout).
The field of type BLOB is always read only and empty in a page (you can not view BLOB fields data directly in page).
Note: You cannot view the code of the GetWorkDescription & SetWorkDescription functions of the Sales Header table. In AL, you cannot view the function implementation of native objects (you can only view its signature).
.
Please verify my answer if you find my answer helpful. Doing so you'll show other community members that there was found a solution and you credit my help.
.
Hi
You can check the existing code in the Sales Order / Sales Invoice Page on how MS has handled the "Work Description" blob field. I think there are two functions in the Sales Header table GetWorkDescription & SetWorkDescription, which you can check
on how it's implemented. Let me know if you need more details.
Thanks
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156