Skip to main content

Posts

Showing posts with the label Getting active company

Getting the active company accounts programmatically

While working on a client case where custom made data export was needed, I coded some classes to make the export. While working with the code, I decided it would be a good idea to make the currently chosen company id a part of the file name when exporting, as the customer have several company accounts, and we need to export from all of them. I spent a little time to find out how to get the current selected company account id and I came up with: static void Job77(Args _args) { ; info(appl.company().ext()); } So I made a function for constructing the file name and put the appl.company().ext() bit in that.