Deactivate a Customer in AX 2012 - microsoft-dynamics

We are building an integration between CRM 2011 and AX 2012.
The connector works quite ok, but we don't want an inactive account to be modified in CRM when some updates are performed in AX.
We would like to make the status change to reflect in AX.
Is there some inactive status in AX as well?

Take a look at the CustTable.Blocked field.
AR-> Common -> Customers -> All Customers -> Credit and collections -> Invoicing and delivery on hold
This field uses the CustVendorBlocked enumeration.
If this is not exactly what you need you might be better off creating new custom field.

Related

Is there a way to query for how many times a user made changes to a TFS ticket?

I'm looking at setting up a query in TFS that tells me how many times a user changed a particular TFS ticket. Is this a possibility in TFS2017 or even in Power BI Desktop?
For example, creating a query in TFS with the following added:
And - Changed By - Was Ever - Smith.John
gives all tickets "Smith.John" ever changed but doesn't tell me how many times he's made changes to them.
Example Image: https://imgur.com/AIUIwPG
From the image above, I'm looking for an answer of 4 (Smith.John changed the ticket 4 times) but it will only appear once in a query. I know this is likely not possible in TFS itself so I'm hopefully looking for a solution in Power BI Desktop.
Is there a way to query for how many times a user made changes to a TFS ticket?
Indeed, it is not possible in TFS itself, all the results of the query are workitems list not the details of workitems.
There is a extension which using the TFS API, it could pull all history for one specify workitem:
TFS SDK: Work Item History Visualizer using TFS API
If this extension does not meet your needs,you could use the API to output the workitem all changes history:
TFS API: TFS Work Item All Changes History
Then export this grid in format you want and save it locally.
If all above are not what you want, you just want to use Power BI Desktop to resolve this issue, you can check following blog, it should give you some help:
Querying the VSTS Work Items API directly from Power BI
Hope this helps.

Navision DB/Company backup and restore using SQL/.NET

In my job, I have to do a lot of backup and restore of NAV companies in order to create new companies similar to previous company. I am planning to build a .net application to do the job. Basically automate the repetitive stuff, but the problem is the Navision we use is 2009 R2 and I can't find a way to backup and restore a NAV database/company in 2009 R2 using .Net/SQL. Is there any way do this?
As said, there is no way to automate it using script. When performing backup/restore Nav doing many things aside from just create another table set. It creates keys/views, append records to system tables like Company (where list of companies is stored).
From your question I can't understand why do you need backup company to create similar one. Because after that you would have to clear all ledgers etc. Why copy data just to wipe it after all?
Alternative approach you could use to solve problem of creating new company fast is to create a codeunit in Nav that will populate newly created company with all data you need. Take a look at codeunit 2 Company-Initialize. When run it creates empty records in all important setup tables and fills report selection. You can modify it or create similar one that will fill setup tables by your default values or copy them from another company you provide as parameter (use changecompany for that).
Here is one more thing that I've found:
In earlier versions of Microsoft Dynamics NAV, you could create a
table by using the INSERT Function (Record) to add a record to table
2000000006, the Company table. In Microsoft Dynamics NAV 2013, it is
not supported to create a company by using the INSERT function. You
must create companies by using the New Company window in the
development environment.
That means that in your version you can even create new Company automaticaly from codeunit I've mentioned.
Also since Nav 2013 R2 there is new capabilities. You can use comandline parameters of finsql.exe to create company (or). And then invoke Nav codeunit from PowerShell script to populate it with data.
there is no way to backup a NAV Company using SQL.
You can backup the whole database only.
If you want to backup a separate company you need to use the built in backup using fbk files (Tools -> Backup)
From NAV 2015 you can backup\restore companies from the RoleTailored\Windows Client.
Cheers!

Set Sharepoint task due date based on workflow status

I'm new to SharePoint but most of it seems pretty straight forward but I've hit a problem and haven't been able to find a way around it so far.
I'm trying to set/enforce Service Level Agreements (SLA's) for different departments based on the department the task is assigned to. I was going to do this based on the workflow status that generates the task but am open to any other suggestions.
My workflow for requesting funds for an approved project goes through several stages (Project management validation, Finance Admin validation; Finance manager validation, Fixed assets authorization) and each one has a slightly different SLA. For this reason, I cant just add an arbitrary value to the start date for the calculated column associated to the task.
Any suggestions?
The option I'd go with here is to use If/Then blocks in my workflow code based on the current stage. Something like this:
If Stage = Project Management Validation Then
Set DueDate to Today+5
Else If Stage = Finance Admin Validation Then
Set DueDate to Today+3
etc.
Hope this helps!

how to bulk change owner ( or other fields) in ms dynamics crm 2013?

In Dynamics CRM 2011, we could export accounts to excel and import again to bulk edit fields (I didn't test). But in 2013, users could only export "this page" account for bulk edit.
Now I need to change accounts owner, accounts number is over 20,000. Manually editing is almost impossible.
I could edit them to modify directly on database. Obviously, it's not a safe way.
Anyone have better ideas?
Probably you are referring to this window:
you still need to select the checkbox "Make this data..." also when you select the second radio button option. the file will contain all the records for re-import.
the interface is misleading.

Inserting records in CRM 2011 using SSIS

I am working on a SSIS (2012) package that collects data from our till system to staging area and from staging area to CRM 2011 (on-premise | Roll up 11).
In CRM we have contact entity and order entity. These two entity are related via a guid called contactid(PK in contact) and customerid(FK in order).
when i insert new order in to CRM how do I ensure that the guid is created to associate that order to either a new contact or already existing contact?
I'm assuming since you're using SSIS your doing straight SQL inserts? If so, this is not supported. Ideally you'd be using the SDK, and in that case, you can set the GUID manually before actually creating the record, although the Contact Id still has to exist when creating the Order.
So you'll want to grab all of your existing Contacts up front, then determine for each order, if the contact exists or not. If it does, just set the customerId when you create the order and you're all set. If it doesn't, you'll need to create the Contact (potentially assigning it an Id), and then setting the customerId when you create the order.
I would echo what Daryl has said in that SQL inserts are not supported and generally a bad idea. However there is a solution, a company called Kingsway Soft make a SSIS component that allows you to read and write into CRM using the web services. The best part of it is that it is free if you don't want to run it using SQL agent. Even if you do want to schedule it the cost is very small for such an excellent product.
You can download it from here
http://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-crm