Power Automate - Update Work Item Error - Response in JSON Format -Azure Devops - azure-devops

I am getting an exception when I am trying to update an existing work item description with a link of SharePoint file in power automate. This SharePoint file had been created when an email with the attachment was received.
Please have a look at the flow and exception below
Can anyone please help me understand the issue?
Thanks,
Bee

It looks like you entered a wrong variable for the field Work Item Id. The field Work Item Id for step Update a work item should be the id of the work item to update.
I saw you set the field Work Item Id to variable {x}workItemUrl. If variable workItemUrl is not the work item id. The automate flow will fail with above error.
You can also check the log to see if the values you specified in the fields are correct.

Related

How can i view the Created Date and the Owner of the Field in Azure DevOps

I am working on Azure DevOps and I know little about the product. I want to view the field history when it is created and by whom it is created and last modified.
I have gone through a couple of things in docs but it didn't help me.
Research up till Now
It shows me the fields but no information other than when I clicked on fields it gives me an option to delete the field.
Path
Organization Setting > Process > Fields
How can i view the Created Date and the Owner of the Field in Azure DevOps
Indeed, there is no such out of box way to get the Created Date and the Owner of the Field.
As a workaround, we could add a custom field in our custom process and set the value to 1 when the field is defined with a value. For example, I create a MyCustomFiled field and add rule to set the MyCustomFiled to 1 if the target field is defined:
In this case, when the target field is created by some one, our custom filed will be set with value 1.
Next, we create a query with following Filters:
Now, we could get the Created Date and the Owner of the Field.
Update:
what about the fields that are already created?
For this situation, we could query workitems whose fields have been modified according to the opposite conditions, for example, the Description field:
If this workaround still not work for you, you could try to use REST API Revisions - Get to get all the history for one workitem, use scripts to filter the revision about the specify field, then loop through all the workitems.
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}?api-version=5.1
Hope this helps.

Clio API - What is the correct format to Update (PATCH) a custom field value for a matter

Anyone been able to successfully update the custom_field_values for a matter via Clio's API?
I'm trying to update the value for custom_field_values under a single matter. I'm able to send a JSON string using PATCH and update the default values for a matter like location or description using the following format
{"data":{"location":"Orange"}}
But when it comes to updating a "custom field value" I'm getting a 422 Unprocessable Entity error. I'm following Clio's v4 API Documentation and my understanding is that to update a custom_field_value you need the following JSON:
{"data":{"custom_field_values":[{"id":658213,"custom_field":{"id":139385},"value":"New Value Goes Here!"}]}}
However here is the message coming with the 422 error:
{"error":{"type":"ArgumentError","message":"An invalid argument was supplied: invalid custom field value id provided, acceptable format is <type>-<unique id>"}}
I can't interpret the part suggesting the acceptable format!
I've also tried sending the JSON in the following format which is closest to Clio's V2 API Docs for updating a custom field:
{"data":{"custom_field_values":[{"custom_field":{"id":139385},"value":"New value goes here"}]}}
But then this is what I get back:
{"error":{"type":"ArgumentError","message":"An invalid argument was supplied: custom field value for custom field 139385 already exists"}}
Please note that this is being tested in POSTMAN regardless of my development environment. I appreciate your response!
I've successfully created queries to update custom field values in matters many times, and these run all the time for me. I've compared your json to some examples of the json I'm successfully sending. Your syntax appears correct, but there's enough missing for me to only guess at where your mistake might be.
First, you're sending a PATCH to https://app.clio.com/api/v4/matters/{matter id}.json right? It took me a while to learn that you can't update the value of a matter's custom field with a query to https://app.clio.com/api/v4/custom_fields/{id}.json.
Second, just to clarify, the 658213 id you used above (the first id field) should be the unique id of this instance of your custom field. You won't get this until you've created an instance of the custom field particular to this matter. The second id field, where you've put 139385 is the id for the custom field itself, which you could get with a query to https://app.clio.com/api/v4/custom_fields.json.
If you're looking in the V.4 docs under Custom Fields, you won't find this, or at least I didn't. BUT you can find it in the intro section to the Matters portion fo the documentation: https://app.clio.com/api/v4/documentation#tag/Matters
Hope this helps. I'd imagine someone at Clio could help by verifying your error string is delivered when you have an incorrect custom field value unique id.
To further clarify Jacob's answer for everyone else:
custom_field{id} is the id given to a custom_field when it's created and will be the same for all matters or contacts it's used in.
custom_field_value{id} is the id given to an instance of the custom_field added to a particular matter and unique only to that matter
To add a custom_field to a matter for the first time the following format is used:
{"data":{"custom_field_values":[{"custom_field":{"id":123456},"value":"string or integer depending on the type of CF"}]}}
To update a custom field already added to a matter the following format should be used:
{"data":{"custom_field_values":[{"id":"text_line-1234567", "custom_field":{"id":123456},"value":"string or integer depending on the type of CF"}]}}
To delete a custom field already added to a matter the following JSON format is sufficient:
{"data":{"custom_field_values":[{"id":"text_line-1234567", "custom_field":{"id":123456},"_destroy":true}]}}
Format for updating a custom field already added to a matter:
{"data":{"custom_field_values":[{"id":"unique_instance_of_your_custom_field", "custom_field":{"id":'custom_field_id'},"value":"value which should be updated"}]}}
Here, the first id field should be the unique id of this instance of your custom field. To get this value follow this documentation section, app.clio.com/api/v4/documentation#tag/Matters and the second id field is the id for the custom field itself.

Increment Id in Sharepoint

I am trying to increment an Id in a Sharepoint list.
I have tried different settings in the online editor of Sharepoint under "Settings > List Settings > Edit Column > Calculated Value".
Another option I tried was to create a custom add form using InfoPath.
In this custom form, I added a rule on my field contactId. The rule has two actions.
Create a Query to the Contacts table
Set the current Id equal to (the maximum idContacts + 1)
enter image description here
A thirth option I tried is to set a rule under Submit options. That way I thought when I submit my form it will check if idContacts is currently blank. It will Query the Contacts table, set the current idContacts as the (maximum idContacts + 1) and finally submit the data to my table.
enter image description here
Finally When I submit my form it gives a pop up message "Connecting to Server" then it redirects to my list but nothing is added to the list.
Does anyone know what my problem could be. Or does anyone know a proper way to do this. I already lookup up a lot of tutorials and other information but I can not find it.
Thank you in advance!

Getting current item ID in SharePoint Infopath form

Can we get the current item ID value while submitting the data in InfoPath form.
I need to use this and concatenate the ID with other field value. Tired "Max(#ID) + 1" function but it wouldn't solve the problem.
I know it can be done using calculated column or workflow.
It needs to be done using InfoPath form ? Is it possible ?
You already figured it out yourself. Im assuming you are trying to use the ID in naming it.
Create a blank field.
Then add that field to your submission naming concat.
Create a receive data connection (assuming you havent) to that library.
On the Submit rule add the query action to that library and a set field action to set that new blank field with max(ID) + 1. Make sure Submit action is last.
That should do it unless Im missing something as I have used this many times!

Update sales order items using a workflow in NetSuite

I'm starting to get the hang of NetSuite but this one has stumped me. I am looking for a way to update the line items on an order from a workflow in NetSuite. From what I can tell it doesn't seem to expose those fields, is there any way around this?
I have a saved search returning all of the transaction line items that I want modified, there is a field on the Sales Order Line Item called "Create Fulfillment Order". It shows up under saved searches as "Create Fulfillment Order Column", but when I add an action to a workflow to set the field value, the only fields that show up are Sales Order fields. Is there any way to access the Sales Order Column fields, since that's really what's being returned by my saved search anyways.
I've looked at the Sub Types defined in the workflow to see if there's one for Sales Order Item or anything but there's not, just Sales Order. Any help would be greatly appreciated, thanks in advance!
There's nothing built-in that will let you access transaction line items from a workflow. You'll need to use SuiteScript to create a custom workflow action. Then you can call that action from your workflow.