Read the below article and thought it was very good. It's important for people to look their best when they go client site. Used to be that people had to be clean shaving each day wearing at least a tie to work. Times have changed obviously.
You can now wear polos and rock the scruff as long as its done well. Below are some great guidelines for looking sharp. In addition to this, remember the small things like shining your shoes to always put your best foot forward. It's the small things that show someone's attention to detail.
As a reminder, this is my blog to write about things that I think are
important that I'd normally put on a OneNote or something for later
reference. This blog is an alternative for me to post this stuff
publicly so I can reference if later if I accidentally break my computer
or point other people to it without having to write an email.
MadeMan.com - 5 Rules For Rocking The Scruff
1. Follow your jaw line
When shaving
your neck, be careful not to cut above your jaw line. Instead, use your
jaw line as a guide, allowing the hair to wrap underneath it. This will
enhance your facial structure and give your stubble a more natural
look. Cutting above your jaw line gives the appearance that your cheeks
have no beginning or end. Not a good look.
2. Tame your cheeks
If you are going to be consistent with this look, do not allow it to
grow wild up the sides of your face. Trim your cheeks down and keep it
clean. Imagine a line extending from the sides of your nostrils to your
ear lobes. Do not let your stubble grow above that. If you have random
black cheek hairs, pluck ’em.
A blog (primarily about Dynamics AX/D365) covering topics like X++, AX for Retail, D365 Commerce, Trade and Logistics, retail concepts, warehousing, etc. Something for everyone. Grab bag blog for whatever I think would help out people in the Dynamics AX/Commerce/Retail community. The opinions expressed on this site are my own and do not necessarily represent the views of my company
Thursday, April 18, 2013
Sunday, April 14, 2013
AX 2012 promoting code via XPO when usually doing model store move
Do the below at your own risk. I don't want anyone screwing something up and pointing the finger at me for something I accidentally omitted or something. I've done the process below a ton of times but never just from referencing an article. PRACTICE in a non-PROD environment first...
Occasionally there are small fixes (e.g. hotfixes) that don't need a model store move. It could just be a few lines of code in an existing object like a class or method. If a company usually does a model store move to promote the code, there are usually concerns about changing the usual promotion cadence.
You shouldn't have to worry about this too much as long as the changes will not change any ID values (e.g. creating new tables/fields). I wouldn't do an XPO move when deleting any of those objects either. It shouldn't cause a problem but just to be safe.
From Microsoft TechNet: Models, Layers, and the Model Store [AX 2012]:
"To avoid ID conflicts, we recommend that you do not use xpo export/import to move customizations in environments in which you are primarily relying on importing and exporting models and model stores. "
The above recommendation says to not move an XPO when primarily using model stores but its a very conservative stance. As long as you are confident the XPO move won't change or create any ID values, there should never be an ID conflict.
Steps to promote an XPO code into PROD (very simplistic).
Occasionally there are small fixes (e.g. hotfixes) that don't need a model store move. It could just be a few lines of code in an existing object like a class or method. If a company usually does a model store move to promote the code, there are usually concerns about changing the usual promotion cadence.
You shouldn't have to worry about this too much as long as the changes will not change any ID values (e.g. creating new tables/fields). I wouldn't do an XPO move when deleting any of those objects either. It shouldn't cause a problem but just to be safe.
From Microsoft TechNet: Models, Layers, and the Model Store [AX 2012]:
"To avoid ID conflicts, we recommend that you do not use xpo export/import to move customizations in environments in which you are primarily relying on importing and exporting models and model stores. "
The above recommendation says to not move an XPO when primarily using model stores but its a very conservative stance. As long as you are confident the XPO move won't change or create any ID values, there should never be an ID conflict.
Steps to promote an XPO code into PROD (very simplistic).
- Import the XPO into the code
- Save and compile that specific object
- Compile the object forward if the object extends and is part of a framework (not doing this could cause your AOS to crash)
- Restart all AOS'es
Friday, April 12, 2013
Compare AX X++ conIns function vs += for container insert
Below is a proof of concept (POC) comparing the 'conIns' function to the '+=' function for inserting records into a container. I know there are a few variables which would make this test not 100% but for a simple POC, this works great to illustrate my point. I made sure to intersperse the two functions between each other to counteract any kind of system load which could possibly kick in which would skew the data.
Use conIns when you need to insert data into a very specific part of the container (e.g. not at the end). If inserting at the end, just use +=.
Results:
Looking at the infolog in Figure 1 below, it took ~2.35 seconds to insert 14,677 records using 'conIns' while it took ~1.67 seconds using '+='. I've highlighted the outliers in the data that don't seem to conform to any pattern so I believe those were affected by some other process.
From: MSDN: Containers [AX 2012]
Use conIns when you need to insert data into a very specific part of the container (e.g. not at the end). If inserting at the end, just use +=.
Note: If you choose to do this on your own, make sure you don't have any breakpoints in or it will screw with the ticks and times will be off thus invalid results.
Results:
Looking at the infolog in Figure 1 below, it took ~2.35 seconds to insert 14,677 records using 'conIns' while it took ~1.67 seconds using '+='. I've highlighted the outliers in the data that don't seem to conform to any pattern so I believe those were affected by some other process.
From: MSDN: Containers [AX 2012]
Performance of
containers
A container is best suited for processes that do not
involve excessive modification to the size or contents of the container. When a
container undergoes excessive additions of data, overall system performance can
be decreased by the need to repeatedly copy container data and allocate new
space.
+= is Faster Than conIns
When you want to build a new container by appending new
data, you can use either the += operator or the conIns function. The +=
operator is the faster alternative. Use the conIns function only when you want
to add new data before the last index of the original data.
static void daxTestConInsSpeed(Args _args)
{
int i;
int j;
int tickBegin;
int tickEnd;
int totalTicks;
int runTestQty = 10;
CustTrans custTrans;
container custTransCont;
str conInsertMethod;
for (j=1; j <= runTestQty; j++)
{
// Grab the current 'tick' count in AX
tickBegin = WinAPIServer::getTickCount();
// delete the elements in the container
custTransCont = conDel(custTransCont, 1, i);
// reset the record counter
i = 0;
// Build the container with data depending on the function we are testing
while select RecId from custTrans
{
i++;
if (j mod 2)
{
conInsertMethod = '+=';
custTransCont += custTrans.RecId;
}
else
{
conInsertMethod = 'conIns';
custTransCont = conIns(custTransCont, i, custTrans.RecId);
}
}
// Grab the current 'tick' count
tickEnd = WinAPIServer::getTickCount();
totalTicks = tickEnd - tickBegin;
info (strFmt("%1 took %2 seconds to process and insert %3 records", conInsertMethod, totalTicks/1000, conLen(custTransCont)));
}
}
Figure 1 - The infolog from running the code above with highlighted outliers
Wednesday, April 10, 2013
How to: Time how long AX code takes to run in X++ (Performance metrics)
If you need to time some code to see how long something ran and you don't want to use the code profiler, you can do the below using the WinAPIServer::getTickCount();
Pretty simple...
Pretty simple...
int ticksBegin;
int ticksEnd;
int totalTicks;
int seconds;
int minutes;
int hours;
// Grab the current 'tick' count in AX
ticksBegin = WinAPIServer::getTickCount();
...
ticksEnd = WinAPIServer::getTickCount();
totalTicks = ticksEnd - ticksBegin;
// Find the seconds
seconds = totalTicks/1000;
info (strFmt("%1 seconds", seconds));
// Find the minutes
minutes = seconds/60;
info (strFmt("%1 minutes", minutes));
// Find the hours
hours = minutes/60;
info (strFmt("%1 hours", hours));
// This will show the time in hh:mm:ss format except there may be only one value (e.g. hh:m:ss)
info (strFmt("%1:%2:%3", hours, minutes mod 60, seconds mod 60));
Sunday, April 7, 2013
How To: Clear or Delete data from an AX container
Using the conDel Function [AX 2012], a user can delete certain elements from a container. When these elements are removed, the numbering in the container will adjust accordingly so that the numbers will always be sequential
There are three parameters container conDel(container container, int start, int number):
There are three parameters container conDel(container container, int start, int number):
- container container
- the container that the user wishes to have the data deleted from
- int start
- the spot in the container to start deleting values
- If this number is 0, it will not delete anything
- The number given will actually be deleted (e.g. 2 will actually include element 2 in the deletion)
- int number
- the number of elements to delete in the container
- If this number is larger than the container, it will delete everything from the start value on
static void daxTestDelContainer(Args _args) { container test = ['a','b','c','d','e','f','g','h','i']; container testManip = test; int i;
info ("BEGIN TEST - the container data in full"); // Cycle (iterate) through the container for (i=1; i <= conlen(testManip); i++) { info(strFmt("%1 - %2", i, conpeek(testManip, i))); }
info ("TEST conDel(testManip, 0, 3) - Remove 3 at spot 0"); testManip = conDel(testManip, 0, 3); // Cycle (iterate) through the container for (i=1; i <= conlen(testManip); i++) { info(strFmt("%1 - %2", i, conpeek(testManip, i))); }
info ("TEST conDel(testManip, 1, 3) - Remove 3 at spot 1"); testManip = conDel(testManip, 1, 3); // Cycle (iterate) through the container for (i=1; i <= conlen(testManip); i++) { info(strFmt("%1 - %2", i, conpeek(testManip, i))); }
// Reset the container testManip = test;
info ("TEST conDel(testManip, 2, 3) - Remove 3 at spot 2"); testManip = conDel(testManip, 2, 3); // Cycle (iterate) through the container for (i=1; i <= conlen(testManip); i++) { info(strFmt("%1 - %2", i, conpeek(testManip, i))); }
// Reset the container testManip = test;
info ("TEST conDel(testManip, 3, 5) - Remove 5 at spot 3"); testManip = conDel(testManip, 3, 5); // Cycle (iterate) through the container for (i=1; i <= conlen(testManip); i++) { info(strFmt("%1 - %2", i, conpeek(testManip, i))); }
// Reset the container testManip = test;
info ("TEST conDel(testManip, 3, 50) - Remove 50 (more than container has) at spot 2"); testManip = conDel(testManip, 3, 50); // Cycle (iterate) through the container for (i=1; i <= conlen(testManip); i++) { info(strFmt("%1 - %2", i, conpeek(testManip, i))); } }
Figure 1 - Infolog from the above code
Thursday, April 4, 2013
C# error: 'Unable to activate Windows Store app... The activation request failed with error 'This app failed to launch because of an issue with its license.'
When building a windows store app in Visual Studio 2012 for Windows 8, I was getting the error 'Unable to activate Windows Store app... The activation request failed with error 'This app failed to launch becuase of an issue with its license. Please try again in a moment. See help for advice on troubleshooting the issue.' (see Figure 1 below)
Resolution: Just a guess but the issue with this seemed to be that while an app is in the development cycle, the licensing will eventually run out on the installed instance. In order to get past this error, you will need to check a box that will uninstall the original project and reinstall it. Do this by right clicking on the project, selecting 'Properties', going to the 'Debug' tab, and selecting the 'Uninstall and then re-install my package. All information about the application state is deleted.' check box (see Figure 2 below).
This fixed the issue for me.
Resolution: Just a guess but the issue with this seemed to be that while an app is in the development cycle, the licensing will eventually run out on the installed instance. In order to get past this error, you will need to check a box that will uninstall the original project and reinstall it. Do this by right clicking on the project, selecting 'Properties', going to the 'Debug' tab, and selecting the 'Uninstall and then re-install my package. All information about the application state is deleted.' check box (see Figure 2 below).
This fixed the issue for me.
Figure 1 - The error 'This app failed to launch because of an issue with its license'
Figure 2 - The 'Uninstall and then re-install my package' check box
Monday, April 1, 2013
Cycle through container in AX
The below code shows how to cycle though a container in X++ for AX 2012.
Yes I know that the below can be done different. I'm doing things a certain way out of concept and writing it on a plane without a compiler. Also, you could use an array instead of a container since this is a single data type but I'm trying to show containers, not arrays.
I would suggest not using conIns for inserting elements at the end of the container as these inserts seem to get slower the larger the container being inserted into becomes. That's why I use the '+=' seen below.
Yes I know that the below can be done different. I'm doing things a certain way out of concept and writing it on a plane without a compiler. Also, you could use an array instead of a container since this is a single data type but I'm trying to show containers, not arrays.
I would suggest not using conIns for inserting elements at the end of the container as these inserts seem to get slower the larger the container being inserted into becomes. That's why I use the '+=' seen below.
int i;
CustTrans custTrans;
container custTransCont;
// Build the container with data
while select custTrans
where custTrans.AccountNum == 'CUS00001141'
{
// The += is faster than the conIns() function
//i++;
//custTransCont = conIns(custTransCont, i, custTrans.RecId);
custTransCont += custTrans.RecId;
}
// Cycle (iterate) through the container
for (i=1; i <= conlen(custTransCont); i++)
{
info(strFmt("%1 - CustTrans RecId: %2", i, conpeek(custTransCont, i)));
}
Subscribe to:
Posts (Atom)