sshriforbaan
1st April 2014, 16:48
Hello everyone,
Many times during development i came across situations where i have to choose between AFS/DLL/DAL. I make my choice based on discussions and past experiences with each of these components.
Now, I want to document some algorithm to reach to a conclusion on which of these will be best fitted for a specific requirement.
Can you guys share some document to help me with this?
Thanks!!
mark_h
1st April 2014, 17:50
Just based off my own personal opinion - if available I would use DAL or a DLL first. AFS just has too many quirks in it - but I have to use it since we are on 4c4.
bhushanchanda
1st April 2014, 18:35
I make my choice based on discussions and past experiences with each of these components.
This is the best way to do it. Plus, a bit of trial and errors adds to it. There are certain cases where only some of them or sometimes only one of them provides the solution.
BaanInOhio
1st April 2014, 23:43
1. DAL(2)
2. DLL
3. API
DAL(2) is best since it requires the least changes when upgrades are delivered from Infor. The only thing you might have to worry about are new fields.
DLL is next since they typically don't change except for new versions. We had some change between fp7 and 10.2.x but they were pretty easy to fix.
API is affected by session (form) changes which can occur at any time. We had more API changes than DLL changes between fp7 and 10.2.x
DLL calls have a few different options:
1. Call the DLL directly from your script with arguments.
2. Call 'dal.start.business.method' with DAL script, function, arguments.
3. Call 'exec_dll_function' with the object name, function name, arguments.
First decision is if you can use DAL for your task. Adding or updating records in most tables = yes. A few tables (like tisfc010) do not support DAL yet, so you have to do something else. DLL works well when well defined and not needing a lot of other external variables to run properly. I have found that some (like service MWO activity plan/release) do not work properly since some external variables (which I don't know) are needed. Otherwise API. Keep in mind that some sessions do not work with API. Others (like ACP purchase invoice entry) do not initially fill all fields based on the entered PO or business partner so you have to fill these through API. As bhushanchanda stated, it is mostly trial and error. I have had situations where I had to program all three methods.