Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Started in Macola Development 1

Status
Not open for further replies.

Bokk

Programmer
Jul 13, 2006
10
CA
I am just starting with Macola and would like to get some input from some experienced developers as to the best way to do so. We are a Macola customer, but as we have inhouse IT, our manager would like us to take on as much support as possible, or at the very least, be very involved as we add additional modules to our current system. I have worked in a different ERP, but on the surface access for doing modifications seems much more limited in Macola. I'm not sure if this is the case or I just don't know how to get into it. I have contacted Exact to see if they offer course(s) for developers (such as resellers might take) that would outline tools, connections, basic examples, common tables and relationships, etc., but am still waiting after almost 2 weeks, having emailed and phoned them.

If anyone knows of such a resource or can let me know if this is even available or how they got started, I would greatly appreciate it.

Thanks,
SGM
 
Where do I start.

Well first the there are 2 basic tools for making "modifications" to Macola. I like to call them enhancements but anyway......

1. Designer. This is the screen designer that allows you to add some fields that are not visible and to add command buttons, check boxes etc.

2. Flexibility. This is an add-on module, Macola's implementation of VBA. You can basically do what you want with it. Can not stop Macola's functionallity but can access the data and using VBa implement pretty much anything you want to do. Sometimes requires work arounds since you can not modify basic macola strategy, but some of us have written some pretty in depth stuff.

Most of the flex support and training is offered through vars such as gainfocus.biz and is done on billable rate per hour. If you have inhouse SQL and vb developers most of them can pretty much start with VBA with minor training in the can and can'ts of the system.

I know this is a pretty general answer but feel free to contact us if you need more.

Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
Thanks for the info on getting started. I assume that when using the Designer as mentioned you do not have the option of adding code.

Once we have the Flexibility module, is there any Exact documentation, or at that point we would look to outside training? I have worked with limited VBA coding, but I feel like I need a sense of how Macola handles their tables and then, as you said, some guidelines of what one can and cannot do, or should or should not do when using Flexibility. I think walking through a couple examples would be invaluable.

Thanks,
SGM
 
You are correct to say that by having designer that it does not allow you to add code. You need to check to see if you are licensed for designer, I believe you should be, but you never know.

Exact does no formal training on Flex that I am aware of. The training that we do is specialized per client and usually consist of

1. Do's and Donts
2. Connecting to your data
3. Limitations and some work arounds.
4. Examples of existing code.
5. Work on some of the simpler projects the client wishes to do, depending on the vba programing skills of the client.

You can get the drm's for Progression from gainfocus.biz, that will give you a good start on the tables, relations, and etc.

Having some of your crystal report writers available to know the field names etc is also nice.

Just my own personal feeling. The examples that Flex deployes on its own can be confusing and sometimes do not work at all causing some screens to no open any longer. If you have a test platform outside your production environment that is the safest way to develope. You may check with your VAR to set up a test platform (can be anything from a standalone machine with self contained db server to a replica of your system.)

I would suggest further that if any of your desires with Flex are over your programming head that you STOP and contact a contractor to do the work. Better have somebody to blame if it goes wrong - LOL




Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
I have downloaded the DRM and it looks like it will be helpful eventhough it is based on Progression. It may address this, but I do have one question. I am trying to assess the relationships of the tables. When I am looking at Enterprise Manager there are over 900 tables. There are many with _sql tacked on the end. Are these a copy of each of the original Macola tables? Would this still put the DB at over 500 tables?

Either way it's very large. I thought it would be nice to see an ERD, but it may be a bit overwhelming. I think it may be best to try and identify the most commonly used tables and learn their relationships. I can see the primary keys in Enterprise Manager, but I don't see the foreign keys. Can these be viewed? Does this sound like a reasonable approach?

Thanks!
SGM
 
What version of Macola and what version of the backend DB?


Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
We recently upgraded to Macola 360 and are running SQL Server 2000 on the backend.

SGM
 
So you are on ES correct?


Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
Over 500 tables is correct. I don't believe Macola has foreign keys in the database itself, it addresses these issues by writing code when it needs to check data against other tables.

There is a table list in Macola ES under system, company, table list. There is good data there but it does not show tha table relationships.

Please be reminded that you are limited in Flex and Screen Designer in ES -- these do not work with the financial modules.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"making predictions is tough, especially about the future" - Yogi Berra
 
Sorry for the delay. Somehow I thought you were on progression.

As Don states ES has some limitations to both the screen designer and flex in ES.

As for an ERD. We have been asking for that since Moses was using macola on stone tablets. There is just not one out ther.

Many of the relationships can be found in some of the canned reports or from training/usage.



Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
Thanks for the information. At least I now have an idea of some of the limitations, first steps and some potential resources to pursue. I really appreciate you (both) passing this on as I was finding it difficult to get answers, even if it was no.

Thanks again,
SGM
 
Your welcome.


Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
I've found EBA to be a lot of help in figuring out the various relations ... specifically the SQL Views that the EBA install creates.

We installed Exact Business Analytics (EBA) 2 weeks ago.

The foundation of EBA is a number of SQL Views (multiple related tables joined together by their key fields).

One good side-effect of EBA is having access to these views. You can look through the View defs and see the key tables and their relations.

As Far as EBA's value is concerned ... I'll let you know later. I'm trying to get EXACT to document which fields they actually make available to be used. You might want to ask them before you purchase.

What percentage of the Macola Fields are actually mapped? We assumed everything was available.
 
We don't currently have EBA in our environment. However, if Exact put out some documentation on it that provided table information, the documentation may be useful from a general perspective.

Thanks!
 
As in previous post. Macola's major lacking is its lacking of documentation on the underside of the packages. I as a developer could not make it by developing an enterprise level package and not documenting the table structure and relationships. The best bet it to look at existing reports and extrapulate the design and relationships from there.


Andy Baldwin

"Testing is the most overlooked programming language on the books!"

Ask a great question, get a great answer. Ask a vague question, get a vague answer.
Find out how to get great answers FAQ219-2884.
 
There is a pretty good but somewhat dated version of the DRMs - Developer's Resource Manuals - available for download on my website.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"A fine is a tax for doing wrong. A tax is a fine for doing well.
" - unknown
 
I agree, the documentation that Macola produces is lacking in alot of ways. To use flex you need to know VBA. Think of it as VBA with limitations with also the addition of Macola's own VBA functions.

Here is some sample code to help you out. What this does on the PO screen is check to see if the requested date has changed on a line item. If it has, then it'll ask you if you want them all changed. We need this since if we change one date they all have to change and some of our orders run over 100 line items long. It would take too long to have them change the date for each line item.

You need to create a DSN to point to your Sql Server/Database. Mine is called 'AccessToSQLHQ'

Private Sub RequestedDate_LoseFocus(AllowLoseFocus As Boolean)

DateAfter = Me.RequestedDate.Text
If DateBefore <> DateAfter Then 'We have a date change
MsgAnswerSD = MsgBox("Do you wish to change requested dates on all line items?", vbYesNo)
End If
If booIsThisOpen = False Then 'Screen is in Change date

If MsgAnswerSD = 6 Then 'Then Yes
Dim username_sql As Variant
Dim AccessMacola As New ADODB.Connection
Dim AccessConnStr As Variant
Dim updatehdrdate_sql As Variant

AccessConnStr = "dsn=AccessToSQLHQ"
If AccessMacola.State = adStateOpen Then AccessMacola.Close

AccessMacola.Open AccessConnStr

updatereqdate_sql = "UPDATE poordlin_sql SET poordlin_sql.request_dt = '" & DateAfter & "' WHERE (((LTrim([ord_no]))=" & Order.Text & "00" & "))"

AccessMacola.Execute updatereqdate_sql, dbFailOnError

End If
End If
End Sub
 
Forgot to add this little bit to it:

Private Sub RequestedDate_GotFocus()
DateBefore = Me.RequestedDate.Text
End Sub
 
Not trying to confuse you but I had the system check to see if it's in 'Add' mode or 'Change' mode. The only way I was able to do this is to use Windows API functions. This code gets put into the 'Module' Section. Anyway hope you get the idea of what you have to go through to do certain things.. It's frustrating.


Declare Function EnumWindows Lib "user32.dll" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Declare Function GetWindowTextLength Lib "user32.dll" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Declare Function GetActiveWindow Lib "user32.dll" () As Long
Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal Msg As Long, wParam As Any, lParam As Any) As Long

Global booIsThisOpen As Boolean
Global strIsThisopen As String


Public Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Public mlngTimerID As Long
Public Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Public Declare Function Putfocus Lib "user32" Alias "SetFocus" (ByVal hwnd As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Long, ByVal lpWindowName As Long) As Long
Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long

Public Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Public Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
Public Declare Function GetDesktopWindow Lib "user32" () As Long
Public Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long

Public Declare Function GetCurrentProcess Lib "kernel32" () As Long

Const GW_HWNDNEXT = 2
Dim mWnd As Long
Function InstanceToWnd(ByVal target_pid As Long) As Long
Dim test_hwnd As Long, test_pid As Long, test_thread_id As Long
'Find the first window
test_hwnd = FindWindow(ByVal 0&, ByVal 0&)
Do While test_hwnd <> 0
'Check if the window isn't a child
If GetParent(test_hwnd) = 0 Then
'Get the window's thread
test_thread_id = GetWindowThreadProcessId(test_hwnd, test_pid)
If test_pid = target_pid Then
InstanceToWnd = test_hwnd
Exit Do
End If
End If
'retrieve the next window
test_hwnd = GetWindow(test_hwnd, GW_HWNDNEXT)
Loop
End Function

Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long

On Error Resume Next

Dim slength As Long, TitleBar As String
Dim retval As Long
Static winnum As Integer

booIsThisOpen = False
winnum = winnum + 1
slength = GetWindowTextLength(hwnd) + 1

If slength > 1 Then
TitleBar = Space(slength)
retval = GetWindowText(hwnd, TitleBar, slength)

If InStr(TitleBar, strIsThisopen) Then
booIsThisOpen = True
Exit Function
End If
End If

EnumWindowsProc = 1

End Function

Public Function ScreenStatus()

'Checks to see if screen is in add mode.
strIsThisopen = "001 Purchase Order Entry - [Add]"
Call EnumWindows(AddressOf EnumWindowsProc, 0)

End Function
 
Private Sub ListView_GotFocus()

Call ScreenStatus 'We check to see if the screen is in Add mode or Change mode

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top