Hi,
If i try to update a deactivated address by code using logisticsPostalAddressHistoricalCDSV2Entity.Update()
I get this error:
Cannot locate datasource record of type logisitcsPostalAddress with RecId xx. EntityName: logisticsPostalAddressBaseEntity, RecId xx, Database operation: Update
Is it because it is old?
Hi Andre,
I know that when the address in FO got removed (ValidTo value changed) -- the other system wasn't notified.
Now when the other system tries to update the address that got removed from FO..it calls the custom service and tries to update the address. My question is why this error appeared, why the entity doesn't allow updating an old address? Because of what? Is there a technical explanation for this error to appear, is it because this entity for example doesn't look at old addresses that's why it says recId doesn't exist even though it exists? Or what happened exactly?
Hi Deldyn,
When you "delete" and address from F&O, the record will not be deleted, but the valid to field will be filled. When this address was removed from F&O and you try to update your other system accordingly, you can't use a delete trigger as F&O updates the existing record. That would probably the reason why the other system still has the address.
As mentioned, don't try to update F&O addresses from external applications as the date effectiveness on F&O tables is really cumbersome for data entities.
Hi Andre,
As i said the address got deleted from FO. But remained in the other system. So when the system edited it and called FO service i got this error.
My question was, did i get this error because it's an old address??
I think the business will ask me to reactivate it in this case..but i want to understand why i got the error in the first place
Hi Deldyn,
When there is a change in the address, usually a new record will be created with a new timestamp (insert). I would suggest follow the same approach and send only an address once the address really got changed in your application.
Hi Andre,
I have a custom service that inserts new postal addresses or if the record already exists it calls the update method.
I use logisticsPostalAddressHistorecalCDSV2Entity and I don't specify validTimeStateUpdateMode
Which means by default, the value is CreateNewTimePeriod
The service is working fine, but there is one time where i got this error and after investigating I noticed that the address passed to the service is old(it seems the other system didn't delete the address while FO deleted/removed it and it's in the history). So my question is, did this error appear because it's an old address?
If yes, do i need to handle it in a specific way like correction?
Hi Deldyn,
What is the business requirement to update historical addresses? Anyway, the table has Valid time state enabled.
have you provided the valid from and to date/time values and does the entity has the ValidTimeStateUpdateMode property set to Correction when updating the record(s)?
André Arnaud de Cal...
291,996
Super User 2025 Season 1
Martin Dráb
230,853
Most Valuable Professional
nmaenpaa
101,156