Saturday, June 21, 2014

AX 2012 issue with menu item button not showing selected record in new form

I recently hit an issue where a lines record with a menu item button was not opening an associated form with the selected record. Normally, adding the menu item button to the form and tieing it to the data source would open the new form showing the record that I had selected on the previous grid.

The ultimate goal was to have a number of lines available in a details grid, select a record, and click a button which would open a new form and show an editable XML for data manipulation. A feature like this is absolutely imperative for interfaces. I've written similar functionality into existing interfaces but this one was tripping me up for some reason.

This is like AX Development 101 stuff. For some reason, there were things on this form preventing it from opening as it should. The normal methods were running short and I didn't want to resort to the menu item parameters via X++ yet. There had to be a way to do this some other way since it was not complex.

In  poking around a bit more, I set the 'CopyCallerQuery' property to 'Yes' instead of 'Auto' and the issue was resolved. See below for the menuItemButton having this property set to Yes.

I've never had to set this parameter before so I think the Auto was automatically triggering to 'Yes' but in this case, reverting to 'No'. Again, I've never encountered this before so I'm not sure why it would revert to 'No'. I did not investigate as to why this was happening, but did feel it important to post about. Hope it helps someone out. Even just one and this post is justified. #TigerBlood #Winning

UPDATE (3hrs after posting): Figured out the issue. Just tired so I didn't think of it at the time. I was calling a form which had that selected record from the caller form as the primary data source. There were no table relations as it was the same record. If the primary table on the second form is a different table with relations in place, the form would be fine without the parameter set below. 

Sunday, June 1, 2014

Retailing in the modern world Pt III - The careful balance in maximizing profits

The goal of a business is to make profit. You need to increase profit in order to grow or sustain a business. You can increase profit by lowering costs and/or increasing revenue. How do you do this? That can literally be the million dollar question. It can also be the question standing between your business and prosperity. The answer can vary from industry to industry and the key to finding it depends on number of factors ranging from timing to personalities to ideologies. The answer will also change as the retail landscape continues to evolve at an ever increasing rate. 

When determining what path to take, remember that there is a delicate balance between reducing costs and increasing revenue. As an example, If you reduce costs by using cheaper parts, you may be making an inferior product. This may result in fewer purchases and more returns thus lower revenue. On the other hand spending too much money on something, like a mobile app for your company, can increase your costs and thus lower your profits.  
How do you know where to skimp and where to splurge?
As stated in previous posts in this series, the answer is different from channel to channel and industry to industry. What may work for the restaurant industry may not work for the wine industry. What works for a textile producer may not work for a clothing manufacturer. From a consultants perspective, how will you know how to advise your clients' positioning for optimal revenue growth? 

The key here is to really know your client's business intimately. Even if you know their industry, do you know your client's secret sauce? Do those industry secrets change the way various sales channels should be leverage? More than likely, its a resounding yes. Truly understanding an organization is a key component to turning a good strategy into a great one.

The next series of posts will analyze the various retail channels mentioned in Pt 1 of the Retailing in the modern world series: