service now, recover delete form changes in update set that is in progess state - servicenow

I have deleted a form in an update set by mistake. I wanted to retrieve the form in update set and deleted the records of delete form from customer updates from my update set . Still I can see my changes in update set. Kindly help how can I undelete the form from an update set.

Related

Current version of data in database has changed since user initiated update process

I have a Master Detail form in my Oracle APEX application. When I am trying to update data in this form, I am getting below error.
Current version of data in database has changed since user initiated
update process. current row version identifier =
"26D0923D8A5144D6F483C2B9815D07D3" application row version identifier
= "1749BCD159359424E1EE00AC1C3E3FCB" (Row 1)
I have cleared browser cache and try to update. But it not worked.
How can I solve this?
I have experienced similar problem where my detail records set has timestamp fields. By default master detail wizard creates the timestamp fields as date picker type fields. If you set the date format on these, it would resolve the issue.
This blog post tries to address this issue on a Tabular Form (I know that's not what the original issue was with, but thought it might be related). It says the same as #sangam does below.
Short version: If you have an updated field that's timestamp datatype, you should set a date/time format.
http://apexbyg.blogspot.com/2015/05/tabular-form-bug.html
My tabular form has a field that's timestamp datatype, but I had already set a date format, so this didn't help me.
Here's another possibility, which I discovered was the case in my application.
That would be if the data the original checksum was calculated on is truly different than the pre-update checksum calculation, due to a design-flaw in your query!
In my application, the source for one of the updateable fields was COALESCE(name_calced, name_preferred). In the source table, the person's name could already be loaded in the record by an external process and we save it to one field - name_calced. But the end-user can enter a preferred name, which we wanted to save to the name_preferred field. We wanted to initially populate the displayed, updateable tabular form field with name_calced, if one existed, or name_preferred if the user had already provided a preferred name. Then they could change that value and save it back to the database.
I finally discovered that the Save action threw the error message if name_calced was non-null, but name_preferred was null. I realized that the initial checksum was calculated based on name_calced, but the pre-update checksum was based on name_preferred, so the application thought someone had changed the value in the background and showed the error message.
What I don't understand is how this problem didn't show up in the past 3 years the application has been running in production!
My solution is to make the field source only on name_preferred, which immediately solved this problem. I also think the back-end process will also get changed to pre-populate that table field from name_calced, so the user always sees the base value, if there is one.
I just had this issue myself. Now, I realize that tabular forms are deprecated at this time, but I have an application that was developed beforehand and still uses them. This issue occurred and I had to get one of our big guns at Oracle to help me out. I do a lot of DB work and a decent amount of Apex development but I'm more of a Java, WebLogic, etc guy, and I really couldn't figure this one out.
In my case, it turned out to be really simple. One of the columns in my tabular form was a hidden field, generated via a sub query. Being hidden, this column is not editable by the user and should not be part of the MRU update. I had the field set to "Hidden Column (saves states)" and setting its type to "Hidden Column" fixed the issue. So, this leads to sub queries being executed in such a way as to change the checksum for the overall query before hitting submit (save), causing the error.
For those who are continuing to troubleshoot this, look at your query for every field that you have specified and note which columns are editable in the tabular form. All other fields should be set in a way that makes them not save state so that they are not part of the update.
I had this error when I had two update processes processing on submit.
My solution was to add a condition to both processing steps. I had forgotten to do this when I made an additional process for Button A, but I never updated Button B to limit it's behaviors.
Navigation:
Processing -> Processes -> [Your Process Name] -> Server-side Condition -> When Button Pressed = [Your button Name]
In my case I had a column from a secondary table that was not set as Query Only and was being updated! The error would occur trying to save a column not in the table being updated. It took me half a day to figure it out (the column names were the same).
Set your Link column hidden to display only in the form.
Set "Send On Page Submit" to 'No' or disable the link column that is your primary key ( Rownum/rowid/id etc).
Hope it will work for you.
I have noticed this error comes when I was working Tabular Form and has disabled one of the form operations i.e. by setting server-side condition to "Never" for add, apply changes (submit) buttons
When I have restored back to its original state, it worked as expected.
In case you have to hide Add/Update button, use some other option.
https://compknowledgebase.blogspot.com/2018/12/oracle-apex-error-current-version-of.html

How do i do the following task with quickbase?

How do i know the users who added the record in quickbase table or who have the permission to add ,Edit or delete the record or how can i check the flow of adding a data into quickbase tables ?
When you create a table in quickbase, it defaults to creating a field that display which user account has inserted the record. The default names are Record Owner and Last Modified By.
Record Owner is for the user who initially created the record.
Last Modified By is for the user account that last modified the record.
Date Created will tell you when it was created and Date modified will tell you when it was last modified. These fields are not default in reports. I would make a custom report that only the administrators can see to follow the tracking of the flow of records adding and editing.
The help file at this link QuickBase Help for User Control will help you understand how to manage your user accounts and also know who has access to what for which application.
Hope this helps.

Dynamics AX 2009: Deleting discounts and added charges

Essentially, what I'm doing is this:
On insert, delete, or update on the SalesLine table, I'm checking the ProductCode of that line and determining whether or not a discount or miscellaneous charge applies
I have lookup tables for the charges and discounts
When any changes are made, I have to effectively remove the discounts/charges, because the newly modified SalesLine might not qualify for the charges/discounts
I have code that is doing what is described above -- but with the following side-effect:
If I highlight several lines in the grid on the SalesTable Form, and click the toolbar's delete button, I get errors.
The error(s) seem to be caused by my code deleting some of the items, and then the form is also trying to delete the lines after they've already been deleted by the code.
What would be the best way to erase the added-by-code discounts or charges when the parent line is deleted, that won't cause the form to blow up if a user selects those same lines for deletion?
Thanks in advance, this thing is driving me crazy!
EDIT: The specific error that I receive when the cached Form records try to get deleted is this:
Cannot edit a record in Order lines (SalesLine).An update conflict occurred due to another user process deleting the record or changing one or more fields in the record.
The most obvious way to delete the added-by-code discounts or charges would be to add your table in the delete actions of the salesLine table with option Cascade. Also make a table relation on your table to the SalesLine talbe. In this way your records are deleted automatically. I would not do this if the discounts/charges are stored as sales lines though.
The error message make me guess, that you delete other sales lines, when deleting a sales line:
When deleting a "real" sales line you delete discount or charge lines.
When doing multi-line delete the #2 line has been deleted by the #1 line delete, but the form buffer has not been updated and the delete fails. This is effectively what the error messages tells you, a line has been updated since the record was read by the form.
Update for the delete problem:
Remove your code from the SalesLine delete methods.
Create a set of recId to be deleted later, populate in the salesLine datasource delete method.
Delete the lines later (maybe from the active method), if the set is not null.

How can I stop "Cascade Delete" from being silently removed by Entity Framework?

I have a cascade delete set in my database. I have also set a cascade delete for the corresponding relationship in my EDMX model.
However if I delete the tables with the relationship from the EDMX and then add them back in through "Update Model From Database" - the cascade has been removed.
Craig Stuntz in a related question suggests that it is a feature, however if my cascades are being silently removed each time I do an update of the model - that's unworkable.
Perhaps I need to change my workflow and not delete and re-add tables in the EDMX, rather just make all the little individual column changes by hand?
If you delete anything from your model you also delete all your changes. Your changes are gone and EDMX doesn't know about them any more. Once you add tables again you must do all your changes again as well.
If you want to keep your changes don't delete your entities and instead run wizard directly. It should just update existing entities without removing most of your changes. I'm aware only about single example where this doesn't work and your changes are lost and that relates to renaming some navigation properties.

LINQ context SubmitChanges

Regarding the SubmitChanges order (Insert, Update, Delete), is there a way to change that order? I need to have the Deletes executed first, any updates, then any new inserts. I have a datagrid where the user can do all add, changes and updates and submit. Since each grid row must have a unique item chosen in it (via a dropdown), it's possible for the the user to delete the row, then try to utilize the deleted dropdown item in a new row, then try to update all changes and have the update fail (since the item the user wants to delete actually still exists in the database because the submit is doing the inserts first). Is there a setting where I can control the automatic update order or do I have to manually do the updates myself?
I have not tried this, but you could consider the following. First, get the ChangeSet using DataContext.ChangeSet. Then, run through the ChangeSet.Deletes calling Table<T>.DeleteOnSubmit on a new instance of your DataContext. Rinse repeat for the ChangeSet.Updates and the ChangeSet.Inserts.
Good luck.
I don't believe it's possible to do this. You would have to process the changes in the order you want, and call SubmitChanges() after each insert, update or delete. If you want the whole thing within the scope of a transaction, use the TransactionScope object.

Resources