Hey guys
We want to put a button on our Item page that auto-generates a URL for us. Here’s what I envision:
Custom table (say ID 50009), named Web Address, which has 3 columns, and only one row.
The columns would be something like “Base URL”, “Image Extension”, and “Drawing Extension”.
So let’s say www.oursite.com/images/ is in Base URL, Image extension is “.jpg” and drawing extension is “.dwg”
Basically what I want to do is have it generate www.oursite.com/images/PARTNO.jpg when I click “generate image URL”, and www.oursite.com/images/PARTNO.dwg when I click “generate drawing URL”
PARTNO would just be the item number, or “No.” from the item record.
It’s a pretty simple job of just concatenating values, but I know nothing about C/AL code so I’m not sure how I’d accomplish this. The reason we’d use a custom table is so that we only have to use our developer’s license to add the initial C/AL code, then any end user can update the URL schemas if we change our domains in the future.
I know how to make action buttons on pages, so I really just need the code and where to put said code (would I put it on the page itself, or on the item record, or what?)
We already have “Item Drawing” and “Item Image” fields, which are set as URL fields so they’re clickable - I will set those to read-only so they serve just as a way to check that our pictures are named properly on the web server.
On that note, does anyone know if it’s possible to make clickable links to a FOLDER in Windows Explorer? I noticed that www. and http:// links work fine when you click the little “globe” button which navigates to the page, but if I put in a C://File, even a file://C:, UNC paths etc, none of those work. NAV just throws an error.