Update for on-premises installation for Dynamics 365 for Finance and Operations, Enterprise edition.
Generic function for switching line numbers on records
Comments are welcome and I'll update the post according to the bugs you can find. However I only spent 10 minutes on this and it's provided to you for free, so please bear that in mind before you send me death threats in the comments.
public static void switchLineNumbers(
Common _currentTopRecord,
Common _currentBottomRecord,
FieldName _lineNumberFieldName)
{
#define.RetryNum(5)
Common currentTopRecordUpdate;
Common currentBottomRecordUpdate;
LineNumber topLineNumber;
LineNumber bottomLineNumber;
FieldId lineNumberFieldFieldId = fieldName2id(_currentTopRecord.TableId, _lineNumberFieldname);
try
{
ttsBegin;
// Initialize correct table id on common
currentTopRecordUpdate = new DictTable(_currentTopRecord.TableId).makeRecord();
currentBottomRecordUpdate = new DictTable(_currentBottomRecord.TableId).makeRecord();
select firstOnly forUpdate currentTopRecordUpdate
where currentTopRecordUpdate.RecId == _currentTopRecord.RecId;
// Make a temporary line value, in case there is a unique index with line number,
// making a free spot to update the currect bottom record with
topLineNumber = currentTopRecordUpdate.(lineNumberFieldFieldId);
currentTopRecordUpdate.(lineNumberFieldFieldId) = maxInt();
currentTopRecordUpdate.update();
select firstOnly forUpdate currentBottomRecordUpdate
where currentBottomRecordUpdate.RecId == _currentBottomRecord.RecId;
bottomLineNumber = currentBottomRecordUpdate.(lineNumberFieldFieldId);
currentBottomRecordUpdate.(lineNumberFieldFieldId) = topLineNumber;
currentBottomRecordUpdate.update();
currentTopRecordUpdate.(lineNumberFieldFieldId) = bottomLineNumber;
currentTopRecordUpdate.update();
ttsCommit;
}
catch (Exception::DuplicateKeyException)
{
if (appl.ttsLevel() == 0)
{
if (xSession::currentRetryCount() >= #RetryNum)
{
throw Exception::DuplicateKeyExceptionNotRecovered;
}
else
{
retry;
}
}
else
{
throw Exception::DuplicateKeyException;
}
}
}
Use at your own risk.D365FO. “The authentication process was not successful. Please contact your system administrator.” error during Connect to Lifecycle Services setup.
Last Chance to Keep More Coins in Your Pot of Gold – Register for Summit EMEA by Thursday to Save €200
Join your Dynamics 365, AX & CRM user group community at Summit EMEA 24-26, April located in the home of the lucky, leprechauns Dublin, Ireland.
Lucky you, you can save up to €200 on your Summit EMEA registration now though you’ll need to hurry, prices increase this Thursday!
Not yet a member? Here’s an additional four-leaf clover – users that are not yet members receive a free company membership for one year. Learn more about membership.
Curious who else will attend? We’ve spoken with several influentials within the Dynamics 365, AX and CRM space on why they’re headed Summit EMEA. Check out their blogs!
D365UG/AXUG Blogs:
· Mike Ehrenberg, Param Kahlon & Muhammad Alam, Microsoft & Keynote Speakers
· Sarah Chritchley, Microsoft MVP & Speaker
· Thomas Bonde, Microsoft MVP & AXUG Leader
· Heather Williams & Tony Stein, AXUG & CRMUG Managers
· Allan Lassen, Solution Architect & CRMUG Leader
· Fredrik Neiderud, Solution Designer & CRMUG Leader
Summit EMEA is the User Group conference that brings Microsoft Dynamics 365, AX and CRM users, industry experts and software development vendors together to discuss important issues, to learn about product updates, and to find genuine solutions that suit your business needs. Don’t miss out - register now.
UnInstall Deployable Package and Model in D365 Finance and Operations
Custom lookup using OnLookup Event Handler in AX7 / D365
Add a percentage markup to inbound transaction valuation against purchase order price in Dynamics 365 for Finance & Operations
Saying Goodbye: The Life Cycle of an ERP
The Life Cycle of an ERP
Your relationship began with a promising presentation, a hint of incredible things yet to come. You dreamed of the places you could go, the hurdles you would tackle together. When the dust settles you discover the reality of your ERP relationship – the good times are the result of a serious investment on your part, time spent cajoling, encouraging and coaching. And the bad times, well maybe we shouldn't go there?
Your co-workers have heard the many dramas of your relationship more times than they care to count and although you sound like a broken record, something always pulls you back into that unhealthy relationship.
But, it doesn't have to be that way. Honestly, it doesn't.
We often make excuses for why we don’t deserve the best. We tell ourselves that our relationships are good enough and that others have it much worse. We limit our potential and don’t reach for our dreams. Isn’t it time we stop making excuses for why things aren't better?
Relationships must evolve, change and be flexible enough to grow together. A lot of ERP relationships just don’t fill the bill…
What to look for?
Here’s what you need to look for in a good ERP relationship.
- Matching requirements? Determine the needs of each department and how you’d like the solution to improve efficiency. Be wary of solutions that deliver much more than you need. Often they are overly robust, hard to learn and sorely underutilized. This typically means you will be paying too much for more than you need. There goes your ROI! Ultimately, the solution should complement the needs of the company.
- Easy on the user (user-interface). The users need to find the solution easy-to-use and implement. This will reduce the time spent on training and addressing errors. One size does not fit all. You can end up with a solution that doesn't really work for you, or again isn't a match for your organization.
- Compatibility with current operating systems. The software should be compatible with other office operating systems. Be sure you know how much time and cost the solution will really take to implement – excluding training. Be sure to investigate implementation methodologies, talk to references and base your decisions on YOUR goals, budget, time constraints and resources.
- Value to the organization. Integrating a new system into your business is a major undertaking. Staff will need to be trained and you might need to change nearly every process you perform on a daily basis. So, during ERP evaluation, you should ask what changes are necessary, how much they will require from your team and how effective they will be in altering the overall efficiency of your business. Be smart about your search. Don’t choose a solution because everyone else has chosen the same one, or someone has convinced you their solution fits your organization perfectly. Do your homework and ask the right questions. Ask them how your needs will best be met and compare that to the competition. If they understand your unique requirements, they will be able to easily answer these questions. At the end of the day the solution should add value to your business. Real value.
- Reporting and tracking. The software should help you in reporting and tracking your resources effectively and easily.
Key Matching Signs
And just like all relationships, you’ll know you've found the right “match” through key signs that are characteristic of a really special relationship.
- You aren’t chasing the relationship’s potential. A happy, well-adjusted pairing doesn’t need to chase what “could” or “should” be. A good relationship just is.
- There’s minimal drama – or none at all. Even the healthiest relationships deal with some difficulties. The healthy relationships deal with the concerns by working together to resolve them and then learning and growing from them.
- And lastly, your friends and family see what you do. If the people who love and respect you the most are begging you to get away from a relationship then that relationship is probably not the one for you. On the other hand, if the people you trust also see what you see in your ERP relationship, then that’s a good sign the two of you may belong together.
Aren't we all really looking for a win/win relationship? You deserve it, you really do. Now go out there and make it happen
Cancel OOTB validation on data field and field control events in AX7 / D365
How To Use "NOT IN" Filter in Dynamics 365 for Customer Engagement V9
Approve Workflow via email using template placeholders #Dyn365FO
Dynamics 365 for Finance and Operations has placeholders which can be inserted into the instructions. Normally you would want this to show up in the email that is sent. One of the most useful ones is the URL link to the exact record that you are approving.
In the workflow configurations use the placeholder and build up your message. Towards the end it has workflow specific ones. The URL token is %Workflow.Link to web%.
For the technical people the token is replaced in this class WorkflowDocumentField.
This is what I inserted into my email template.
<BODY>
subject: %subject%
<BR>
message: %message%
<BR>
company: %company%
<BR>
for: %for%
<BR>
</BODY>
Should look like this.
The final result looks like this.
If you debug these are the place holders that are put together.
Code to Confirm and Post Project Item Requirement for Sales Order in Ax 2012
SalesFormLetter salesFormLetter;
salesTable Salestablelocal;
str 200 msg;
salesid salesid;
if(salesid)
{
select Salestablelocal
where Salestablelocal.Salesid ==salesid
&& Salestablelocal.salestype==SalesType::ItemReq
&& Salestablelocal.SalesStatus==SalesStatus::Backorder;
if(Salestablelocal)
{
ttsBegin;
salesFormLetter = SalesFormLetter::construct(DocumentStatus::Confirmation);
salesFormLetter.update(Salestablelocal);
salesFormLetter = SalesFormLetter::construct(DocumentStatus::ProjectPackingSlip);
salesFormLetter.update(Salestablelocal);
ttsCommit;
msg = "Item Requirement with Sales order id : " + salesid + " Posted ";
}
else
{
msg = "Item Requirement with Sales order id: "+ salesid + " already posted";
}
}
else
{
msg = "Item Requirement with provided Sales order id does not exists";
}
Storage and transfer of electronic documents by Email
Microsoft leads in analytics and business intelligence
Lifecycle Service companion app
The tool is unofficial and comes AS-IS.
https://github.com/Microsoft/2LCS/releases
Error more than one form was opened at once for the lookup control in D365
Updates tiles in LCS not updated
D365FO – Speed up Retail RSSU download performance
If you don’t know that RSSU is, I suggest reading this, but the RSSU is about having a database locally in your store that the MPOS or CPOS can connect to. It is typically used if you have an unreliable or slow internet connection.
One of the things you can evaluate is to implement the Azure Express Route, and Microsoft have released a whitepaper for Dynamics 365. This can really speed up the connectivity performance.
Another thing I see is annoying is that the local RSSU is only picking up the distribution files every 15 minutes. The Cloud channel database is really fast. This means that when sending new products or prices to the RSSU, it can take up to 15 minutes before this data is available in the MPOS. That is really annoying to wait 15 minutes when testing.
In the Microsoft documentation we are instructed to use the Data Sync interval to speed up the synchronization. But somehow it does not work.
But there is a way around this. On the local RSSU there is a configuration file, where you can modify how often the RRSU should request new data to be downloaded.
Then change the following two lines:
Then just restart the AsyncClient Services and reset the IIS on the RSSU box. Then the distribution of data to the RSSU is really speeding up.
But what is the recommended setting from Microsoft ?
This is recommended to make the RSSU request packages at an interval that is a proper fraction of what the packages are generated at. So if you are sending new products every 10 minutes? Do 5 minutes. If you are sending new products every 5 minutes, do 2 minutes download interval. The higher frequency the more often the RSSU will request data, and some consider this as a waste of bandwidth.
Good luck in your retail implementation
Demystify Dynamics AX 2012 Security
Building roles and implementing strong security in AX can be a daunting task, many times, we hear that customers do not know where to start when designing or developing their security. The audit team at Fastpath created a tool to assist in designing security roles for Dynamics AX 2012.
Security design is an important part of any security setup. Roles in Dynamics AX were designed for ease of access, not segregation of duties. You can use this worksheet to recognize where you have conflicts, and build better roles to fit your company's needs.
AX 2012 Security Overview
The security model within AX is a hierarchy-based structure; privileges are assigned to duties, which are assigned to roles. Roles are the only security layer assigned to users and privileges are the only security layer that assigned to actual securable objects within the system. The security matrix provided by Fastpath is setup at the duty level as this is the most used security layer where access is assigned.
Matrix Overview
The matrix provided by Fastpath has a number of different tabs.
Default Security – shows the out of the box role -> duty -> privilege assignments that are present in AX
Next you will see duties broken out into the different AX areas/modules, these include:
- Assets
- Case Management
- Environmental
- Financial
- Human Capital
- Inventory
- Manufacturing
- Payroll
- Project
- Purchasing
- Reporting-BI
- Retail
- Sales
- Service
- System
All Duties – shows a listing of all out of the box duties that are present in AX
Matrix Instructions
- Select an area/module you would like to develop a role for
- Enter the name of the role in the top bar
- Now navigate down the duties, placing an ‘X’ in the rows were a user should be able to perform that duty/task
- Once done, you can use this document as a guide to create your security within AX
Note: Since this is an Excel document, all sorting, filtering and other Excel operations are available. Click here to download the matrix.