Invalid insert. Service with SN App Service ID: BSNXXXXXXX already exists.

Ajay37
Tera Contributor

Hi All,

I am getting the above error, when I am trying to insert record into the custom tables extended from the Business Service(cmdb_ci_service) table. I have found the solution of updating Show counter in Number maintenance. But my doubt is, why it happens? It used to work previously, but suddenly it is throwing error like this. And also, the number field is getting updated with the number during insertion of the record. If any logic is updating that number, it should consider the latest number right? but why it is taking the existing numbers? Could anyone has an idea on this?

Note: We don't have auto number enabled on this table

Thanks

8 REPLIES 8

Maik Skoddow
Tera Patron
Tera Patron

Hi

please check at System Definition > Number Maintenance whether there is a record for your child table. If so, remove that record and your child table will get the next available number from its parent.

Kind regards
Maik  

Hi @Maik Skoddow ,

Thanks for the response.

Child table doesn't have any separate number field and doesn't have any record in Number Maintenance. It consists parent number field only with prefix BSN which is Business Service table's. I have checked the latest number and compared that with the number in Show counter.

 

find_real_file.png

find_real_file.png

Sorry, but I cannot follow you anymore. 

Especially your statement "I have found the solution of updating Show counter in Number maintenance" is confusing.

Maybe someone else can help you better.

Kind regards
Maik

As a resolution for that error, I have gone through few blogs and found solution like below.

Add the Number column in the table list and sort (z to a). This will give you the last number on the table.

Go to the Number maintenance and search for prefix BSN. Open that record, click on the Show counter related link. It opens Number counter record for that table as shown in below image. Then in Number field, Update the Number to the latest number + 1 on the concerned table. 

find_real_file.png