Hey All,
As regular readers of this forum have surely noticed, I've been asking a lot of questions lately. With a few exceptions, all have gotten very helpful responses, which has enabled me to complete my initial setup of SugarCRM (thanks!). With that out of the way, I'm starting to develop integration points between Sugar and our software, and it occurred to me that some of the code I'm writing might be useful to someone else.
Specifically, I have one bit of Java code (a class with three methods) that mimics the createGuid functionality within SugarCRM. Why would anyone want this, you might ask? Well, since SugarCRM uses MySQL, and since JDBC can connect to MySQL databases, Sugar records are extremely easy to work with in Java. If your main application is written in Java (like ours is), you can have it create Sugar records (for instance, creating a "New Customer Setup" project with a list of pre-defined Project Tasks) just by doing a few INSERTs.
Since Sugar is extremely flexible about its IDs, you really could use whatever ID scheme you want for these new records, as long as you ensure uniqueness. But, if you're like me and you want to keep things as "Sugary" as possible, you'll want to generate a proper Sugar ID for your new records, and that's where my code comes in: by replicating the existing ID generation functionality in Sugar (I literally copied the PHP code and then changed it, line by line, to Java), you can do just that.
But before I bother posting this code, I have to ask: does anyone out there even want it? Am I the only one interested in Java/SugarCRM?


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks