Looking Back on my Workterm at Geoson

Share This Post

As my work term at Geoson Solutions comes to an end, I believe now is a good time to reflect on my time here as a software developer co-op.  For my last blog post, I thought it might be a good idea to document some key concepts I’ve learn before I start my next chapter.

A lot of what I’ve learned when developing ERP extensions revolved around the different techniques for presenting data accurately to the end user.  A common case you’ll face when developing workflows and reports is extracting fields from different tables within the Business Central database.  Usually when we do this, we create instances of those tables and filter them accordingly like so:

				
					Record.SetRange(field_on_record, value_to_filter_by);
if Record.FindFirst() then begin
	// able to access record fields now
end
				
			

If we have a table with multiple rows/records, we will need to set a filter using the SetRange() method to specify which row we are extracting field data from.  However, if the table is just a single row/record, you can get away with just using the .get() method on the record to pull that single row instance.

Another way of presenting data would be through a process called “API Integration” where one would use and make calls to external REST services and APIs within Business Central.  There are already wrapper objects in AL that allow us to make different HTTP requests and perform CRUD actions through a BC application. 

				
					var
	Client: HttpClient;
	Response: HttpResponseMessage;
	Content: HttpContent;
	Headers: HttpHeaders;
	Request: HttpRequestMessage;
	Res: Text;
begin
	Request.Method := 'GET';
  Request.SetRequestUri('api_url_goes_here');

  Client.Send(Request, Response);

  if Response.IsSuccessStatusCode then begin
      Content := Response.Content;
      Content.ReadAs(Res);
      Message(Res);
  end else begin
      Error('send an error message')
  end;
end
				
			

Above is a basic example of making a GET request.  Integrating other method calls will also follow a similar syntax, but sometimes if the API call is complex you may need to code a workaround solution by creating an API wrapper of your own.

Though these scenarios are fairly simple, I think they are core concepts which can help developers understand the different ways data can be presented to users, and how certain workflows can be programmed in BC based on client software specifications and requirements.

Working at Geoson Solutions was quite an exciting experience which showed me the deeper relationship between business and technology.  Special thanks to Dawn and Sonny Pawchuk for the mentorship in these 8 months. Not only were you both fantastic at demonstrating leadership, but your patience for my hundreds of questions has really helped me grow into my potential.  I also want to thank James McCullough for his assistance in helping me code different features while teaching me certain best practices before pushing my code to production.  I am truly grateful I was given the chance to learn and grow here as a software developer co-op student

Subscribe To Our Newsletter

Get updates and learn from the best