Business Partner not getting Created - Adempiere - erp

I just deleted some of the fields of the Business Partner Window by logging in through System Administrator and now when I created fields again , and set their alignment , i need to enter the Search key Manually.
It doesn't fills automatically like before, If i just proceed with blank search key i get the following error:
-----------> MBPartner.saveNew: [POSave_31778910-6af9-4ff2-8736-0335ea702a4f]
Not inserted - C_BPartner[12]
-----------> GridTable.saveWarning: SaveErrorNotUnique - ORA-00001: unique constraint (E2DEVELOPMENT.C_BPARTNER_VALUE) violated
Any help would be appreciated!!!

I got the answer, the problem was due to deletion of all fields on tab and creating them again, the ad_sequence got corrupted. Once the ad_sequence was updated from backend Oracle the Business Partner started working fine again.

Related

How can I post updates for deleted records using TEMSDataSetResource in RAD Server 11

I have created a simple new Rad Server Package with resource with a data module to access a Firebird 3.05 database running on Ubuntu 18.0.4. I included sample endpoints and a database endpoint with one table from the database.
I modified the created FDQuery to return a subset of the records.
select * from EXPENSES where COMPANYID = :COMPANYID
It indicated the FireDACFBDriver was not found, and instead of adding the PhysFBDriverLink, I deleted the FireDACFBDriver in the project source and it asked to add back the FireDACIBDriver and it works. This is besides the point, I think, but just full disclosure. I have tried the PhysFBLink with same results, but have had trouble switching back and forth to Linux deploy, so this works for testing I believe.
The client app consists of a TEMSFireDACClient, a FDSchemaAdapter, FD TAble Adapter, FDMemTable and datasource and dbgrid and three buttons.
Button1
Expenses.GetEndpoint.Params.Clear()
expenses.GetEndpoint.Params.AddItem(
'CompanyID','10000080');
Expenses.GetData();
Button2
FDMemTable1.delete;
Button3
Expenses.GetEndpoint.Params.Clear();
expenses.GetEndpoint.Params.AddItem(
'CompanyID','10000080');
Expenses.PostUpdates;
Button One retrieves multiple rows, and button two deletes a row locally, and button 3 tries to apply the table updates back to the server.
When attempting to post updates. I get the following error:
EMS Error: Resource error. Request parameter not found: COMPANYID.
This works when the resource SQL is SELECT * FROM EXPENSES. Is it just that the TEMSDataSetResources can only work on the full table, or Is there something simple I am missing or a reference available for how to accomplish this?
I have tried creating a manual delete endpoint with:
delete from EXPENSES where EXPENSEID = #####
However, that is another post maybe if I have to go there. I cannot get around and error converting Unicode to integer variant when passing the parameter.

What is the field of owner of opportunity in SAP B1 SDK?

I added Opportunity in SAP B1 by using SDK it's fine, but I have one problem, the field of Owner I used is DataOwnershipfield but it adds nothing, there is no error returned data added successfully but no Owner. I even tried to use DocumentsOwner which is used in documents it returns error message Unable to lookup DocumentsOwner
What is the real field of Owner in SAP B1 SDK?
Please anyone can help me
On SAP 9.3 PL06 that I've tried it the following code works:
SalesOpportunities oOpport = oCompany.GetBusinessObject(BoObjectTypes.oSalesOpportunities);
oOpport.DataOwnershipfield = 5;
The DataOwnershipfield attribute is the owner field. It is an integer corresponding to the empID from the Employee Master Data table (OHEM)
EDIT:
There is the possibility that on oOpport.Add(); the opportunity is successfully added but the Owner not, however on oOpport.Update(); it is successfully added.
I would suggest a check after each Add and if the owner is not successfully added to update it. (on a sample of 20 examples, 3 failed with no obvious consistency)

Umbraco upgrading from 7.4.3 to 7.6.1 Cannot insert duplicate key

Am trying to upgrade Umbraco from 7.4.3 to 7.6.1 and receiving the following error from the installer:
The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot insert duplicate key row in object 'dbo.umbracoNode' with unique index 'IX_umbracoNodeUniqueID'.
When I look in the umbracoNode table I can't find a row with the uniqueID shown in the error message.
Any else had this problem and found a way to fix it?
Many thanks
Edit:
So tried disabling the IX_umbracoNodeUniqueID constraint and instead got the following error:
The database failed to upgrade. ERROR: The database configuration
failed with the following message: There are no primary or candidate
keys in the referenced table 'umbracoNode' that match the referencing
column list in the foreign key 'FK_umbracoRedirectUrl'. Could not
create constraint.
Any further ideas?
UPDATE:
I did eventually get this to work. I created fresh install of 7.6.5 (Umbraco had moved on since I started this post) and then imported the "umbracoRedirectUrl" table into my original database from the clean install. That coupled with disabling the IX_umbracoNodeUniqueID index in the "UmbracoNode" table allowed the installation to complete. Once the install completed I tried to turn the index back on, which provided me with a more useful error message so I was able to track the node with duplicate uniqueIDs and manually delete. They appeared to related to a previous bug. Once I had removed them I was able to reactivate the IX_umbracoNodeUniqueID index.
Hope this is helpful to someone else.
Drop the index 'IX_umbracoNodeUniqueID'. I had the same issue and comparing my db to other Umbraco 7 dbs, this doesn't appear to be mandatory.
After I did this I got a separate error regarding a default scheme being missing, this was due to my DB user being set up wrong. If you do get this though, just change the default scheme of your user to 'dbo'.

Error 2002 : The EntityContainer 'X' for the storage model specified as part of this MSL does not exist in MetadataWorkspace

I'm trying to integrate my Oracle Database into my ASP.NET app, but I keep getting this error :
Error 2002: The EntityContainer 'OracleDBTargetContainer' for the
storage model specified as part of this MSL does not exist in
MetadataWorkspace.
I've tried everything I could think of but still can't figure out what's wrong.
What can I do to diagnose the root cause of this?
This is still new to me so I might miss something very obvious.
I'm assuming it my not like my database as the Diagram displayed when I integrated another DB. I've checked the foreign keys, primary keys, ... but to no good.
Using VS2013 with ODP.NET 12c Release 3.
EDIT : My EntityContainerMapping is empty, is that normal?
<EntityContainerMapping CdmEntityContainer="PMModelContainer" StorageEntityContainer="PMModelTargetContainer"></EntityContainerMapping>
I found what was wrong.
One of my foreign key didn't match the primary key (Number 20 instead of Number 10)
I saw on stack overflow that it could be a problem and checked my tables but I missed that one obviously.
How did I realize it ? Well because rather than creating the EF Designer, I chose the Code First from database option, and, oh, what do you know, the error message now tells you EXACTLY what the problem is ! (Table names and columns).

Site column does not get deleted

I have a Site column which i delete programatically using the following code. I have already removed all references to the field previously. However, even if there is not error, it goes to fieldtodelete.Delete() and steps through the next line. However, when i check the Site Column collection using SPM2007 or via the UI the site column is still there.
Dim fieldtodelete As SPField
Try
fieldtodelete = site.RootWeb.Fields.GetFieldByInternalName(name)
'site.RootWeb.Fields.GetFieldByInternalName(name)
fieldtodelete.Delete()
Catch ex As Exception
Console.WriteLine("Field: {0} was not deleted", name)
Return 0
End Try
Any ideas on why sharepoint does this? Also, there are 2 fields with the same name, i am not sure if this has a direct effect on this. I want to delete both.
Thanks
Since there are 2 fields with the same name, their internal names are likely different than the Name. Are you sure the line
fieldtodelete = site.RootWeb.Fields.GetFieldByInternalName(name)
is actually returning a valid SPField? If not, you will need to find the internal names of the fields, which don't necessarily match up to the Names.
EDIT: Since you said that you are getting the fields back, I realized you aren't calling site.RootWeb.Update() after deleting the field. That should fix the issue.

Resources