A record exist only in Extension table, but not in the Base table - dynamics-crm-2011

I came across a weird situation:
I found a record that only exist in the entity's extension table in the DB, but doesn't appear in the entity's base table?
How is it possible?
Is there another optional reason beside the one of someone deleting the record directly from the base table?
Thanks in advance.

No other optional reasons, someone deleted manually the record from the base table

Related

Duplicate entry '??' for key 'emp_name_unique2'

When I design my table, there comes a error:
Duplicate entry '??' for key 'emp_name_unique2'
My design table:
When I save it, comes the error.
Where is the problem?
EDIT
My data in t_employee:
That is, you see the emp_name, if you want to set it to unique, you should make sure the value is unique first.
You have many same ?? in the emp_name.
In general, Design table should before add data.

Update field datatype after publishing DAC Extension

I have created a customization which contains DAC extension. There are few extra fields added to Stock Item screen (InventoryItem table). After publishing, the customer had a requirements for one of the field to change its datatype from string to bool. I did updated in customization and published it. However, it did not updated in database. As a result it was throwing an error. Is there anything I am missing here? Please suggest.
Acumatica doesn't delete columns out of the database as a result of a change in your customization. You have two options here, you can drop the column via SQL command and publish, or more realistically, you can just create a new UDF with a different name and change your code.

Issue adding a new field to an entity in crm 2011

I am running into an issue when adding a new field to an entity. In my entity I had 526 fields, I tried to add a new one but I got the error message "Attribute xxx cannot be created because we have hit a maximum number of attributes allowed for an entity (1000)". However I only have 526 fields in the entity. Furthermore, I deleted one field I don't need anymore and I tried to add my new field but I still have the same error message even though I've deleted one field. Could anyone help me out please. I do appreciate it. Thanks !
Walloud
You will be hitting the column limit, even with only 526 fields.
You have to remember that CRM will add its own fields in addition to the ones that you have, such as ones for base currency. This can take you over the limit.
Also consider that the Filtered Views that CRM automatically creates have extra columns for lookup (name), optionset (name) and date (local) fields which can also mean you exceed the limit there.
I think your only options are to delete more fields in order to free up the room, or re-architect your entity design to split it over multiple related entities instead
Looks like you are facing the SQL Server 8k row limit
you can check the field names and verify this.
more information here:
http://mileyja.blogspot.com/2013/09/dealing-with-8k-sql-server-row-limits.html
You need to remember that some fields, such as currency will have two separate fields in SQL thus increment the column count by two for each one you create. If you have 500+ fields on a single entity then it is time to normalize the data and start breaking it out into related entities. It will be better for performance and your data in the long run.
http://en.wikipedia.org/wiki/Database_normalization
Cheers!

Generate only modified tables classes - Subsonic

Is there a way to generate classes only tables those got changed (column added, column modified, column deleted etc.)?
Not really, but there's usually no reason to worry about that. If you have custom code that you don't want overwritten you can put it in a partial class. Was that the issue?

Solr MultiValue Fields and adding values

I am building a search engine, and have a not so unique ID for a lot of different names... So, for example, there could be an id of B0051QVF7A which would have multiple names like "Kindle" "Amazon Kindle" "Amazon Kindle 3G" "Kindle Ebook Reader" "New Kindle" etc.
The problem, and question i have, is that i am trying to enter this data from a DB of 11 ish million rows. each is being read one at a time. So i dont have all the names of each ID. I am adding new documents to the list each time.
What i am trying to find out is how do i add names to an existing Document? if i am reading documentation correctly, it seems to overwrite the whole document, not add extra info to the field... i just want to add an extra name to the document multivalue field...
I know this could cause some weird and wonderful "issues" if a name is removed (in the example above, "New Kindle" could be removed when a newer Kindle gets released) but i am thinking of recreating the index every now and again, to clear out issues like that (once a month or so. Its taking about 45min currently to create the index).
So, how do you add a value to a multivalue field in solr for an existing document?
Since according to the question linked to by #Mauricio Scheffer's comment... Solr does not currently support updating a single field value in an existing document. I see that there might be a couple of options here...
In your process that is pulling data from the database, when it finds a new name, it will need to pull all fields for the existing document from Solr, add the new value and resend the complete document to Solr (you may already be doing this).
Add some additional logic to your code that reads from the database, to gather all of the unique names for each document prior to inserting documents into the index. However, given that you have ~11 million records, there could be a resource constraint that would prevent this from being feasible.

Resources