Gary@ADL Posted January 27, 2023 Share Posted January 27, 2023 Hi Guys - are we able to use the database direct function to change records? we need to change the value of a custom field set during request capture by a request question. i have looked and cant seem to change it in the request itself, so i tried to change it using SQL but im getting an error here, so i wandered if im doing something wrong, or is this a permissions issue? i can get the record ok but when i try to run the following - UPDATE h_itsm_requests SET h_custom_a = 'P1' WHERE h_itsm_requests.h_pk_reference = 'PM00238151' i get an error executing query if i click on the field i want to change, i get an error about no primary key? many thanks Link to comment Share on other sites More sharing options...
Steve Giller Posted January 27, 2023 Share Posted January 27, 2023 17 minutes ago, Gary@ADL said: are we able to use the database direct function to change records? No, is the simple answer. Database Direct only allows SELECT statements. Link to comment Share on other sites More sharing options...
Bob Dickinson Posted January 27, 2023 Share Posted January 27, 2023 Hi@Gary@ADL Why are you unable to edit this on the request itself? If it is due to the custom field not showing, you should be able to temporarily make h_custom_a visible on the Details section for that particular service, simply by clicking "Design" (as an Admin), adding a custom field e.g. Single Line Text Field, ensuring you select h_custom_a, and clicking "Apply Changes". This would then allow you to edit the value of the custom field via the Problem Record itself (rather than trying to do it via SQL which we do not allow). And once changed, you could hide the custom field from view again if you didn't want it visible going forwards. Bob 1 Link to comment Share on other sites More sharing options...
Gary@ADL Posted January 27, 2023 Author Share Posted January 27, 2023 Hi Guys - thanks both, @Bob Dickinson this is brilliant and works thank you i had figured out if i changed the field from a dropdown to a single line text field it would let me change it within the Questions section of the ticket, but this wasnt updating the backend. the way you have shown me also updates the backend too, which does exactly what i need it to do, many thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now