Remove item from sla_slaenabledentities optionset - dynamics-crm-365

I'm using dynamics 365 v8.2 on-prem.
The "Task" entity is not sla enabled - inspite that sla_slaenabledentities optionset contains "Task" item.
I can't manually check "sla enabled" checkbox in Task - I get the following error:
The picklist or status value 4212 is invalid for optionSet a483e6d4-85ef-457a-9bf4-5dfff8381e88 because another picklist or status option for this optionSet already exists with that value
4212 is the task object type code and a483e6d4-85ef-457a-9bf4-5dfff8381e88 is the id for sla_slaenabledentities optionset.
As a result, I can't import solutions that contains sla enabled Task to prod or manually mark the sla enabled checkbox in Task.
Any ideas?

Related

Security of Hidden ID in Views

for editing a data in views we should specify an "Id" to submit to out controller. but imagine that user manually change "Id" value. for example Id=10 change to Id=15 (by some tools in browser like Inspect). in this case EF update data with Id value 15 and trick our application. what is the best solution to overcome this issue?
My Solution:
in each domain class create a property named "UniqueId" as string type and when we add data to database, this property must be valued with GUID besides "Id" value. now when we send view to user UI we must send both property "Id" & "UniqueId" as hidden, then when client post data to controller for update, our logic section shall check "Id" & "UniqueId" both together and if any nonconformity existed, we can throw exception.
please help for this issue and mentioned solution. thanks

Which product not available in magento why it's job is created

Which product is i have already deleted from magento 1 then import product in odoo then why deleted product job is created ? and then this job is failed and raise this error : TypeError: int() argument must be a string or a number, not 'NoneType'
This error occured in attribute value get None, But in this problem deleted product job should not be created.
Because some product are not created completely, so there in product creation some data are missed so that is not display in magento backend.
But that product is already in magento database so it's job is created.

Why is the master data service from SQL Server 2016 creating a text field as the primary ID?

If I create a new entity from excel, or from the UI and select "Generate code automatically" for the Code attribute, MDS creates an attribute of the type "Free-form - Data Type : Text, Length : 250" !? Why not "Number, Decimals: 0"?
MDS does not give you control over the attribute types for the two default fields 'Name' and 'Code' on any entity. That is unfortunately how it was designed.
In the back-end, MDS actually uses integers as the primary keys for the entities it generates. You can look at how this is done by creating a subscription view in the web-app, and then logging onto the database with SSMS and scripting the view you created. You will see a few more attributes created and used.

Web API Entity Framework error - Item with idenity already exists in the metadata collection

I am experimenting with a Web API 2 project in Visual Studio 2012. I used the code first from existing DB option with EF6 to select one table and one view. I then tried to create a controller for the simple table using the profile for Web API 2 OData. The scaffolding of the controller fails telling me that "the item with identity 'Client Last Reveiwed On' already exists in the metadata collection". The problem is not only am I sure that field is unique for this project but that field is part of the view and not the table. Below is the model generated for the simple table (t_Client) that I was trying to create the controller for. As you can see the offending column is not part of the class. I will add below the definition for the column that VS/EF doesn't like which is in the class for the view.
Any ideas why this won't work?
Partial Public Class t_Client
<Key>
<DatabaseGenerated(DatabaseGeneratedOption.None)>
Public Property ClientID As Integer
<Required>
<StringLength(255)>
Public Property ClientName As String
Public Property isActive As Boolean
End Class
Here is the column that is defined in a separate view.
<Column("Client Last Reviewed On", TypeName:="date")>
Public Property Client_Last_Reviewed_On As Date?
I am not sure which of these steps fixed the issue but here are some notes on the topic.
Removing references to the model based on the SQL view eliminated errors.
I went into SQL and updated the view to contain a row number column.
Even with the row number column, EF tagged multiple columns as the key.
I manually edited the model to make the row number column the key.
I also had to update a cast the data type of a few columns in the SQL view to match reality, mainly bigint that was really just integer.
My guess is the fix was the well defined key.

Make a record in one Entity Inactive when a value is changed in another Entity of the same record in crm 2011 on-premise

I have two entities, Bookings and Discharge.
When a record is created in Bookings, it automatically creates a record in Discharge. Discharge
has an additional field that is a drop down with four options.
I want a functionality where when any one of the values in drop down is chosen, the similar record in Bookings
should shift from "Active" view to a default view which I have created by the name of "Processed" in Bookings.
What I have in mind is to create a hidden field in Bookings that is populated when I choose one of the options from Discharge drop down and based on that field the record should shift the view in Bookings. But how do I populate the hidden field? Workflow is not giving me that option or maybe I am doing something wrong.
Help?
So I have created a 1:N relationship between Booking and Discharge. The field is updated in Booking based on the field in Discharge and I choose the particular record in Booking from the look up field in Discharge. But I want to get rid of this second step. I don't want to choose the record in Booking entity but directly update it from Discharge. There are some fields and their values common in both forms, can I create a relationship based on that?
Regarding the first part of your question
"What I have in mind is to create a hidden field in Bookings that is populated when I choose one of the options from Discharge drop down and based on that field the record should shift the view in Bookings. But how do I populate the hidden field?"
If the field is not on a form you can't set its value hence the following:
I don't believe you can set a hidden field using a workflow. However there is a 'visibility' option on the form designer.
I suggest you add your "hidden" field to the form. Then double click on it and toggle the "Visible by default" checkbox. This will hide the field from the user.
You can then set the value of this field using a workflow.
Regarding part two of your question
I don't want to choose the record in Booking entity but directly update it from Discharge. There are some fields and their values common in both forms, can I create a relationship based on that
You have a 1:N relationship however you want to set the related Booking Dynamically is this correct? You cannot select a Booking in the lookup field based on criteria from a workflow. You would need to use a plugin.
If the Discharge has a related Booking (the Booking lookup on Discharge is already set) then you can use a workflow to either:
1) Set a field value (Using 'Update Record' in the Workflow steps) in the parent Booking
2) set to Inactive (Using 'Change Status' in the Workflow steps) in the parent Booking