I have been on a course of reducing debt over the last few years. More purchases using cash, paying most bills as quick as possible. But like most Canadians (Americans as well) I carry some credit card debt. My interest rate for my cards was quite reasonable so I had gotten somewhat use to using them to make mostly online purchases. Over the last little while my rate had jumped several percentage points. I was upset, however I decided that I could live with an increase for now. However today on my latest credit card statement the rate was bound to jump another 2%. I can absolutely understand when the cost of debt is high or that the account is in poor standing that interest rates would reflect those realities, however neither is the case here since the current overnight lending rate in Canada is 1/4 percent and my credit card account is always been in good standing. I am not going to speculate on why this is happening, when I spoke to the representative on the phone I was told that lots of accounts were going up and that the actual base rate was almost 20%. I have decided out of principal that I can no longer deal with the vendor and be cancelling my credit card (paying off the remaining balance). After this we will be down to one household card, just enough for those emergency requirements/needs. I suspect I am one of the fortunate ones that can afford to pay off and close out an account but I wonder how many others will do the same when faced with this reality.

When working with Sage mobile from time to time you will find that there is missing functionality that you expected to be there but is not. One such piece of functionality involve pick lists and recently worked on a project that required ‘must exist in list’ functionality. By the way did I say how much I like using Eclipse when I have to do java development. Well I do.

Must Exist In List

MustExistInList is a property of Sage Saleslogix web and Lan client picklist. This ensures that the end user cannot enter any free form text into the pick list edit area. This property however has yet to make it up to the mobile implementation. Since the property does not exist and it is not possible to introduce new controls into the form building process I had to take a more intermediate step. The first thing to remember is that most of the controls that exist on the BlackBerry device start as a HorizontalFieldManager.

Generally the following layout for each control is followed

< Label Field > + < Seperator Field > +  < Edit Field >

however with the lookups and picklists the following layout is followed

<Label Field> + < CMPImage > + < Seperator > + < Edit Field >

Now I was not completely sure on the layout of the control, so to help me on a way I wrote a simple helper method that did nothing more then to iterate through the embedded fields on the HorizontalLayoutManager and inform me of the embedded class names.

Once I had this information in hand I built out a pick list adapter method. I should have created a full adapter to allow for future expansion however sometimes KISS should be honored especially if under the gun to deliver in short order.

Its a simple method but effective in providing the functionality.

public static void setPicklistEditable(CMPPickList field, boolean editable ) {
    HorizontalFieldManager manager =  (HorizontalFieldManager) field;
    EditField edit = (EditField)manager.getField(3);
    if (edit != null) {
        edit.setEditable(editable);
    }
}


Note that the index for the field is 3 even though there is 4 embedded controls as arrays in java are 0 based .

Beginning BlackBerry Development is a Light read at 238 pages. However there are enough golden nuggets of information to make it well worthwhile picking up this book. Remembering back to the days when I started BlackBerry development there was a complete lack of documentation with exception to the SDK guides to help the novice navigate the in and out’s of mobile development. I could imagine that I would have spent less time banging my head against the wall if I had a guide that would explain in simple terms the fundamentals of developing of with the platform. The book takes a basic approach and covers many of the topics required to get up and running and provides some insight into the 2 major development platforms for BlackBerry development, the JDE and Eclipse. I highly recommend this book for anyone getting into BlackBerry development and it is well worth the cover price in the time it will save in ramping up.

- Mark

This is going to be short post on BlackBerry mobile development, specifically SalesLogix Mobile BlackBerry development. A current customer requirement called for the need of a multi-select pick list control. This control would allow the selection of 0,1 or many values from a pre-determined list. The stock pick list control provided in the platform does not support very rich scenarios like this so I was forced to create my own control. Its not that big of a deal, create a derived field control add a layout manager and host the controls you want to display. I have made good headway this weekend on the control with it generally working the way I expected until I decided to add the initial setting  of the selected items code. For this code we take the comma separated list of values and split it into each of the selected items, when finding a match, check that item as selected. So happily I wrote the code in eclipse and then moved it over to Sage Mobile Application Architect.  (I like and use eclipse for heavy java code development tasks). So when I compiled and deployed the client system I was quite surprised that I could not start the mobile application at all. There was no error, no visible indication that I had royally messed up, or that the customizations did not take. Nothing. So I went back to the code that I wrote and started to systematically comment/uncomment until i could find why the client was not starting up. Finally I hit pay-dirt and to my surprise the following line was causing the application to not start;

String[] values = selectedValues.Split(“,”);

What? I mean string splitting, it has to be there. Its such a basic function and eclipse tell me it exists through the dot prompt functionality. Digging into the BlackBerry API documentation it seems that this method really does not exist. Bah. So of course I roll my own custom split method and it works as expected.

Lesson: If the application will not start at all look at your customized code and ensure that you are not using some java API that is not supported on the mobile platform

Now that SalesLogix 7.5.2 has officially released I wanted to revisit my decision to avoid ‘Code Snippet Actions’. I have been traditionally been using the Code snippets (Obsolete) actions in the past due to issues that I was having with the new form interface based actions. So for the last little while on several of the projects I have been working a specifically decided to to write all my UI event handlers using the form based actions. I have to say that I am very pleased in the stability that 7.5.2 introduced. It is a great step in the right direction. For the simplest UI based customizations it seems like a practical choice and it will be within my recommendations moving forward.

Now, even though it looks as if the code issues of working with Code Snippet actions have been resolved there is still a way to go until it is a very efficient way to develop advanced UI functionality. I want to cite several items that still need to be addressed.

1. Views that are generated and then translated into custom smart parts will fail to work. A form based interface is generated based on all of the designer forms in AA. Once a form is unbound from AA (made custom and moved into support files) the interface is no longer generated and your snippet methods will fail.

2. Accessing any non-interface defined properties or methods means casting to a specific control type. This kind of code is much easier to resolve in Visual Studio.

3. Common classes, shared methods are not first class citizens. If you want to create utility methods that are shared for all of your rules (UI/Business) you either have to create an external assembly and reference it or create an empty handler and add code after the closing } for the class definition that will be globally visible.

4. Though the platform is now based on 3.5 framework the CodeSnippets are defined as a 2.0 project so it may only be possible to have some of the new .net 3.5 goodness in a external assembly at this time. (I want to confirm this and see if there is a code gen script that can be updated)

One of the targets for 7.5.2 was increased performance. In this regard I have to say I am very happy, all around it seems snappier and more responsive.

It really looks as if this release is definitely moving the platform forward.

I am working on a customization for a client and while making some changes to the Ticket Detail quick form and compiling I was getting a velocity exception as pictured here

image

I had been adding controls, and a new form load action when I got this issue so my first suspect was around the load action given the description. I systematically removed the script, and all of the newly added controls. To my dismay the exception continued to occur.  I then copied a fresh version of the TicketDetails smartpart/resx file back into the model and refreshed the project and the error went away.

It was then when I was re-cleaning the smart part when I found out what had happened. You see there is a contract lookup on the detail smart part. For this customization I had to remove it as it was not needed. When I removed it I was unaware that there was a reference to the control in a load action validation method. Since this reference still existed NVelocity could not resolve to the control hence the exception (though the error is not that descriptive). Once I removed the reference I was then able to recompile again.

So the Rule is: If you are removing a control from a smart part, ensure that there are no validation/property set actions referencing the control or you will see the above error.

Every time I start blogging again after a extended period away I mention that I will be working harder to create more posts. Surprisingly, or not so, I find it hard to find time to blog in a consistent manner. Mostly due to the fact that I am finding my day to day development efforts to be quite busy. That being said blogging and community is very important to me.

From time to time, I find that I would love to have days that would be considered a do-over. Nothing works as expected and the simplest work items are very difficult to effort. It could be environmental, lack of tooling, architecture or the product does not perform or is not at a place where it should be. These days can be tough for the most experienced of us as well as the new developer coming in trying to understand all of the underlying technologies. Yesterday was such a day, though the day was painful, there has been others and there will be more, ultimately I was able to move the product forward and solve some immediate customer pains.

It is unfortunate that these days exist, but they are a nature of the beast. We are working on complex systems with a myriad of technologies that are merged together to create some cohesive package. I think we understand this and I am fortunate that I have some very excellent customers, many of which I count as friends after many years of working together. What I am still struggling with is occasionally  the minimizing of the effort that it may take to get a development job done. It still gets me when someone, outside of the development fray can estimate an effort at 20-30% actual effort not bearing in mind all of the work items that need to be accomplished. Fortunately when these come along I do not have to engage in them as the risk is too high.

I count myself fortunate in that I have a geographically diverse customer base. I have clients in the USA, Canada, UK, and Germany. It has allowed me for the most part to ride out the difficulties in the economy. Somewhere in the next few weeks I am scheduled to head over to UK with a mid week hop to Denmark. It will be good to see parts of the world that I have yet to have been (its also nicer to get paid to do so).

SalesLogix 7.5.2 MySlx Types

SalesLogix 7.5.2 is due to be released soon and one of the new features is a simplification of some of the complexities of the platform. Note at time of writing MySlx Api components are in pre-release version and could have some changes by RTM.

So in a nutshell MySlx is start of wrapping some of the platform complexities into a set of cohesive, easily discoverable types. In its first release there are 3 types available for access as follows

 

  1. MySlx.Security
  2. MySlx.MainView
  3. MySlx.Data

 

Access to these types are available by default in the C# code snippets and full code complete support is provided.

clip_image002

 

Now here is an example of the Data type and a helper method to get back a list of ComponentView objects that can be directly bound to a grid. This allows for easier translation of current LAN client code to be consumed in the web client.

 

public static void GetContactThatStartWithA(IAccount account, out IList list)
{
    list = MySlx.Data.GetList(
                 "Select LastName, FirstName from Contact",
                 new object[] { "LastName", "FirstName" });
}

 

Hopefully in the near future I can blog about each of the types and the methods that they contain.

Until then

- Mark

0-60, is a metric used to determine how long it takes a car to get to the top speed. The better the car is tuned the the lower the time to reach 60 mph. I was wondering on the weekend if this metric could be used in software development or more accordingly in the usage pattern of a company implementing a solution. Instead of 0 to 60 mph, why not 0-60% efficiency using the CRM, or EPR or some other software. So how long will it take your team to get 60, or 80 or even 100% value from your chosen software package. I suspect 100% is not a realistic target, but is 80% and if it is, what does it take to get there.

Talking with a business partner about the use of company internal developers vs. external BP based SalesLogix developers I wondered how long it would take for the internal developers, the ones that work for the end customer, to become 60% efficient at creating the customizations needed for the business to succeed. Also given the current economic climate where the internal developers are asked to do more in their already busy workday, how much of their focus would be on learning the technologies. These constraints can slow down the ability to reach that 60% efficient goal dramatically.

Couple the friction of getting the solution completed internally (technology, resources, capability) with the need for the business to get the solution in their hands, the initial perceived savings of in house development may actually be out of grasp. With a car, you can tweak and tune, and if needed be change the exhaust, tires, and even the engine the same cannot be said with a developer. When there is a business running on the software or solution it can better to couple with a partner, or developer who already has a tuned engine to aid in winning the race.

Technical debt is that chore that developers owe when they go back into old code. It’s the process of cleaning up or right sizing the code that they wrote to make it more readable, efficient and remove any dead code that is not longer in use. In my day to day I jump from project to project and recently I have re-engaged in a project to fix some defects and potentially add some little enhancements. I also consider that these times of re-engagement the opportunity to pay back some of the technical debt of deliveries gone by. Yesterday was one of those days where I was reacquainting my self to the code while offering up some refactoring. The funny things is even though I have been and software developer, engineer, architect and what ever other hat I wear for so long I still found my self once and a while feeling like I had a little bit of vomit in the back of my throat while reviewing the code. I am every grateful at the pliability of code and so thankful for Refactor, or R# for allowing me to easily and efficiently re-architect pieces and parts and a very forward and pragmatic way.

Question is, when you look at some of your old code, do you leave with a warm and glowing feeling, or do you feel a little sick and ache to be able to have a bit of a do-over. I suspect if you are a professional developer the later is the more realistic response. I really believe it is in all of our natures to say, if I knew then what I know now, or shit … if I just do this, or this this thing would work better, be less coupled, provide a better experience.

Its the trade off between time, money and resources, and going through the development cycle and initial time that  I suspect that will always leave us knowing that we can do even better given more time, resources.

Yesterday for me was a great day for handling technical debt, though it was long at 14 hours, by the end of the day I was happy with what was accomplished.

I have been working with a SalesLogix business partner on a project for a while. A few nights ago I got a query from their developer with regards to an issue that they were having. While trying to implement a main view in the web client (known as an entity page) when they would navigate to the page and try to add a group it would fail with an nice and friendly message stating that the XML Schema was missing.

I have heard in the past that there had been some problems with the group builder functionality and started to investigate down that line. I even followed up on the blog provided by Ryan Farley at  CRM Developer . Finally I contacted some of my sources to understand how the feature was working and if there was some way to force a schema rebuild. Initially yet knowing the true issue I was told that I could force a rebuild of the schema by updating the datacode field basically reversing option 3 in Ryan’s post. Thinking that this was the right course of action I did so and unfortunately the page still would not render correctly.

I then dug a little deeper into the page’s setup to see if there was something amiss. In so 2 items came were identified as issues.

1. The page did not have a configured entity type

2. The page’s alias was not the same as the entity type it is hosting.

So the first issue was the big one. Given that the entity type was not set there was no way the group builder functionality could determine the base table/schema to resolve to. Once I set the page type correctly it was now possible to display the list view grid and build queries in the client.

The second issue was identified after enabling a column as a link column and trying to display the detail page. Since the internal resolution of the URL for a link is based on the entity type name if the page is no named the same as the entity it cannot be located. Once I changed the alias the page’s details were now displayable.

So when you make an entity page make sure that you set the entity type, and also set the page alias (name that the page is generated as) to the same name as the entity.

Cheers