Hi All,
I have recently configured a new SQL Azure database and exported AX 7 entities as described in the link below:
I am getting issues when trying to enable change tracking for SalesOrderHeaderEntity and SalesOrderLineEntity. The message says “Entity sales order is not supported for change tracking as it doesn’t have any primary index or alternate key “. But SalesOrderHeaderEntity does have SalesOrderNumber under Keys node of the data entity, it is referring to the SalesID field on SalesTable, which is an alternate key on SalesTable.
Does anyone have any clue why it is not working or is there anything we might be missing in configuration ?
Thanks,
Baber.
*This post is locked for comments
Hi Baber
While using the custom entity to enable change tracking receiving error
Relationship between [%1,%2 ] does not exist .
No worries. I think you are trying to make changes on SYS layer. Try to make change on USR, CUS or VAR layer and then you should be able to do that. Not sure why you are unable to open the link. You can open Issue search in LCS and put 3816049 in the search box and then you should be able to see the details.
Thanks,
Baber.
It seems like the forum breaks some posted links, after pasting the pieces together I was able to get a link to open, but got the error:
Something went wrong
Message
Sorry, the current user does not have permission to access this resource.
Error code
PermissionDenied
And yes, I was logged into LCS in that browser instance, so not sure what the problem was.
It seems strange to me, this is very clearly a bug in Dynamics 365, but instead of simply fixing the bug, instead Microsoft goes in the opposite direction and deletes posts where a workaround was posted. It seems like a strange strategy to me.
As for the index, I tried making the change in AOT within Visual Studio (everything was disabled), as well as directly in the [AxDB] database while signed in as axlocaladmin (everything was also disabled).
I am going to have to learn some fundamentals here first it seems.
Thank you for helping me Baber, I've had a very long day today so I particularly appreciate it today!
Hi,
You just need to change these properties in existing index StagingIdx on staging table. I have made changes in StagingIdx table for PurchPurchaseOrderHeaderStaging table. The link worked for me and opened in LCS. If you have LCS login, you can login with your partner credentials and view the contents inside the link.
Thanks,
Baber.
Thanks Baber,
Unfortunately, your link above won't load for me; on my end, it resolves to the URL: fix.lcs.dynamics.com/.../1199605;amp
But that's ok, I think I understand the problem based on your description.
On PurchPurchaseOrderHeaderStaging, I do see StagingIdx with settings AllowDuplicates=Yes and AlternateKey=No
Unfortunately, even though I have System Administrator role, these properties seem to be read only. I also am unable to add a new index by right clicking the indexes node (as I believe you are supposed to be able to do, based on something I read elsewhere).
I've never changed anything in AOT before, I simply created a new Dynamics 365 for Operations project in Visual Studio and then opened the AOT window, perhaps there is a complete process I need to be going through? Any hint you could offer would be greatly appreciated.
Hi ,
Take at below IssueSearch link:
fix.lcs.dynamics.com/.../1199605;qc=162dbbaa315c0cf367480a5bd4b7aacb7ab85800c616813419b2864a48691eb5
It seems like Microsoft have removed the contents on the link I provided earlier. The above link mentioned the workaround to enable change tracking which is to create a unique index on Staging table. The PurchPurchaseOrderHeaderEntity has index StagingIdx which is not unique OOTB, so you need to set its AllowDuplicate property to NO and Alternate Key property to YES. This is what I did to make it work for all the entities where I need change tracking.
Please let me know if you have further queries.
Thanks,
Baber.
Has anyone gotten this to work? I am attempting to enable change tracking on Purchase orders (PurchPurchaseOrderHeaderEntity) and am getting the error:
Entity Purchase orders is not supported for change tracking as it doesnt have any primary index or alternate key
Entity Purchase orders is not supported for change tracking as it doesn't have any primary index or alternate key
However, looking in AOT I see:
AOT>DataModel>DataEntities>PurchPurchaseOrderHeaderEntity>Keys>EntityKey>PurchaseOrderNumber
This being the HEADER table, PurchaseOrderNumber should in fact be unique, so what might be the problem here?
Hi Baber,
What was the workaround?
Thanks,
The link does not work and I can't find the workaround. Can you help....
Found this in Issue search with a workaround. Below is the link:
fix.lcs.dynamics.com/.../NotFixed;qc=d771f0be8c0977b671f7d519dd7dd47c8593e662d7339a6defc0ea78b2bbef37
Thanks,
Baber.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,802 Super User 2024 Season 2
Martin Dráb 229,133 Most Valuable Professional
nmaenpaa 101,154