I am getting below error while deleting JournalEntry,
<ErrorDesc>cannot DELETE synchronized TXN_HDR record. Use REVERT object API</ErrorDesc> <DBErrorCode>20924</DBErrorCode>
Can anybody help me out for the reason.
Thanks,
Reshma D.
Journal entry delete is not supported in v2. You can revert the last change to an journal entry via the API but cannot delete it. You can only delete it from QuickBooks.
Related
I would like write a mutation updater that unlinks a linked record from another record.
For example, suppose I have the following in my store:
client:root {
user: {__ref: "someid"}
}
I am looking for a way to unlink user and client:root. user is a nullable field. I would like subscribers that are interested in the user field to see it has gone null.
Right now the only way I am seeing to unlink this field is to delete the node from the store. I've tried setting the link to null using setLinkedRecord but that throws an error.
.setLinkedRecored() expects the first argument to be an instance of RecordProxy. Use .setValue() for unlinking nodes, as whitep4nther commented above.
store.getRoot().setValue(undefined, 'user');
I was just fighting with this as well, and after digging through the relay codebase, I decided there isn't an appropriate way to go about this right now. I've opened an issue here.
Am trying to upgrade Umbraco from 7.4.3 to 7.6.1 and receiving the following error from the installer:
The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot insert duplicate key row in object 'dbo.umbracoNode' with unique index 'IX_umbracoNodeUniqueID'.
When I look in the umbracoNode table I can't find a row with the uniqueID shown in the error message.
Any else had this problem and found a way to fix it?
Many thanks
Edit:
So tried disabling the IX_umbracoNodeUniqueID constraint and instead got the following error:
The database failed to upgrade. ERROR: The database configuration
failed with the following message: There are no primary or candidate
keys in the referenced table 'umbracoNode' that match the referencing
column list in the foreign key 'FK_umbracoRedirectUrl'. Could not
create constraint.
Any further ideas?
UPDATE:
I did eventually get this to work. I created fresh install of 7.6.5 (Umbraco had moved on since I started this post) and then imported the "umbracoRedirectUrl" table into my original database from the clean install. That coupled with disabling the IX_umbracoNodeUniqueID index in the "UmbracoNode" table allowed the installation to complete. Once the install completed I tried to turn the index back on, which provided me with a more useful error message so I was able to track the node with duplicate uniqueIDs and manually delete. They appeared to related to a previous bug. Once I had removed them I was able to reactivate the IX_umbracoNodeUniqueID index.
Hope this is helpful to someone else.
Drop the index 'IX_umbracoNodeUniqueID'. I had the same issue and comparing my db to other Umbraco 7 dbs, this doesn't appear to be mandatory.
After I did this I got a separate error regarding a default scheme being missing, this was due to my DB user being set up wrong. If you do get this though, just change the default scheme of your user to 'dbo'.
Is there a quick way to delete rows in a CloudBoost database without sending an ID as parameter?
For example, imagine that I have a list of Dogs and would like to delete those whose color is white.
Looking in the documentation, I could create a CloudQuery to retrieve all Dogs that matches this condition and then call CloudObject.deleteAll to remove all of them. The problem in this solution is that I needed to retrieve all the data to be able to remove them.
Is there any straightforward solution for this problem to avoid making unnecessary requests to the server?
currently, cloudboost has no option like this that you are looking for. To delete you have to first fetch cloudobjects then deleteall(). Anyway, you can contact cloudboost team and request for this feature. I am sure they will help you out on this.
In my application i got the error as con't update stale object. I don't know about this object. When it will create and why it was called a stale object. I want to know. Is it used in Only in ROR or other languges are also uses, this object and purpose?
According to the documentation:
http://api.rubyonrails.org/classes/ActiveRecord/StaleObjectError.html
Reason of Stale object exception is:
Record is stale when it's being saved in another query after instantiation, for example, when two users edit the same wiki page and one starts editing and saves the page before the other.
Solution: To avoid this exception use the locking system:
http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html
In my application multiple threads to be able to edit the same work -> version -> element record. its detecting error and raising the suitable error.
I typically did to handle the error:
I print a flash message such as "Sorry, please try after someone time, someone else editing this working version element".
element.lock_version = Document::Element.find(element.id).lock_version
element.save!
For example, such as detecting that one edit changed the element's type, where as the other edit changed the element's name by different creator, and then code of the two record should be merged done in one save.
In general, I used to element.reload to fetch a fresh version of the element.
worked fine!!
I have a Site column which i delete programatically using the following code. I have already removed all references to the field previously. However, even if there is not error, it goes to fieldtodelete.Delete() and steps through the next line. However, when i check the Site Column collection using SPM2007 or via the UI the site column is still there.
Dim fieldtodelete As SPField
Try
fieldtodelete = site.RootWeb.Fields.GetFieldByInternalName(name)
'site.RootWeb.Fields.GetFieldByInternalName(name)
fieldtodelete.Delete()
Catch ex As Exception
Console.WriteLine("Field: {0} was not deleted", name)
Return 0
End Try
Any ideas on why sharepoint does this? Also, there are 2 fields with the same name, i am not sure if this has a direct effect on this. I want to delete both.
Thanks
Since there are 2 fields with the same name, their internal names are likely different than the Name. Are you sure the line
fieldtodelete = site.RootWeb.Fields.GetFieldByInternalName(name)
is actually returning a valid SPField? If not, you will need to find the internal names of the fields, which don't necessarily match up to the Names.
EDIT: Since you said that you are getting the fields back, I realized you aren't calling site.RootWeb.Update() after deleting the field. That should fix the issue.