I would like to use a trigger to update the "Assigned To" equals "Created By" on a newly created task.
you can simply do this assignment within trigger,
objTask.Owner = UserInfo.getUserId();
here owner refers to 'Assigned to' field
Related
I have created a new inherited process and a custom Work Item Type - "User Story". I then added ADO system's 'Created By' field to my fieldset
User Story Fieldset
And then created a rule to set the value on creation
User Story Created By value Rule
However, when I go to enter a new User Story, the validation won't let me Save:
Validation for Author field
Note that the 'Author' came from the label I had previously used for this field:
Label field Created By to Author
According to the error message Field 'Author' cannot be empty, I think you should customize a field named Author and set the field as Required in Options.
If you don't find the Author field in the Work Item page, it may be due to the selection of Hide from layout.
Through the test, The field name displayed in the error message has nothing to do with the label. Even if you name the label of Created By field as Author, the error message should be displayed as Field 'Created By' cannot be empty instead of Field 'Author' cannot be empty.
So you can check whether the situation I mentioned above caused your problem .
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.
I have created a form to update a query that that is in turn based on a master table containing information on a number of files. This master table is then related to several other tables in say for example a table called group_table, defining which group the file would belong to, which contains an ID field and the group_name. This is then related in a one-to-many relationship with the master table based on the group.ID and a field in the master table master_table.group and joined in the query the form is based on.
In the form I have designated a listbox control to update the group field of the query/master table. The contents available for selection in the list box were set based on the group_name field from the group_table table which is defined in the RowSouce section of the property sheet of the form.
So my issue is that when I try and update any records in the query using the listbox in the form, all of the records that are the same will get changed as well. E.g., changing a record in one row from "Group A" to "Group B" will change all the records containing "Group A" to "Group B" in the group field. So I was wondering if there is anything I can do to set it so only the specific record that I want to change gets changed.
When you are making the call to update the table you should make sure that you are using WHERE along with the primary key to make sure that you update that row only. An example would be a statement similar to the one below.
CurrentDb.Execute "UPDATE [group_table] AS G INNER JOIN [master_table] AS M
ON G.[ID] = M.[groupID]
SET G.[group] = '"& Group A & "'
WHERE M.[groupID] = '" & groupIDFromForm & "';"
Apply the ON from the join so that the foreign key and primary key are going to share the same value, and from there use the form to create a variable that you can use to identify the exact row. From there the program should execute the query correctly.
I need help on how to create the following workflow please. I added a new body field in the NetSuite sand box called “sow.” It is a check box field and I added it to the sales order transaction page. Is it possible to make a formula that says: If “contract type” field that exists on opportunity equals “sow”, check box, if not don’t check box? So the field contract type is on the opportunity and once this is contract type is set to SOW the checkbox SOW on the opportunity should be checked.
Your workflow will need a single State. The State will have a single Set Field Value Action, which will mark the checkbox accordingly. This Action will have a Condition that looks at the value of the Contract Type field.
New Workflow
Name the Workflow
Give it an ID
Record Type: Transaction
Sub Types: Sales Order
Trigger Ttype: Before Record Load
WorkFlow Condition: Condition
Field: SOW -- Compare Type: checked
Workflow Condition
i have created a Nintex Workflow in Sp10 which after a few checks, duplicates the current item via COPY ITEM to the same list.
What i now need is to change 2 values of that newly created item(status and Ready) but i am unable to get the new id of the just created item.
there are too much columns to use the Create Item action nor is it the customers wish to copy the item to a hidden list and that another workflow edits the values before copying the Item to the original list.
is there any way to get the id for the duplicated item? I am not so familiar with Webservice.
regards
Pascal
I came across such scenario. As "COPY ITEM" workflow action do not return newly created Item "ID", I used below steps to resolve the problem:
Store the Values of "Current Item" in Workflow variables as required. (In your case status and Ready).
e.g. OldStatus = Status OldReady = Ready
Use "Update Item" workflow action and update the "Current Item" with your desired values required for newly created Item (In your case status and Ready).
Use "Copy Item" workflow action and copy the "Current Item" to desired Library/List.
At this step your newly created Item will have your desired values.
Here we basically revert the "OLD" values of current item. So, Use "Update Item" workflow action and update the "Current Item" with its original values.
i.e. Status = OldStatus
Ready = OldReady
I know this is not the best solution but it will work.. :)