Solved

Service Object or SmartObject does not show CRUD methods but Lists

  • 4 February 2016
  • 7 replies
  • 67 views

Badge +9

HI,

May be I am missing basics of creating SmartObject through service tester utility but I would like to know how it works.

I have created some database tables (empty ones and with some records ). Then I Registered a service instance for that MS SQL Database Type  that created some service objects.

 

1. When I looked at the methods, empty tables shows only list methods and tables with some records shows all CRUD and Lists methods. Why is it so?

 

2. How to add all CRUD methods once service instance is registered ?

I even tried to add records on the tables and refresh the service instance but that does not add any CRUD methods on that service objects.

 

3. Is there a way to delete these service objects only without deleting the service instance?

I can delete the smart objects but I can not delete the service objects.

 

Thank you.

icon

Best answer by Albarghouthy 5 February 2016, 10:55

View original

7 replies

Userlevel 5
Badge +16

Hi IPO,

 

1. When I looked at the methods, empty tables shows only list methods and tables with some records shows all CRUD and Lists methods. Why is it so?

The reason why you have only list method is that you don't have Identity column or primary key.

 

2. How to add all CRUD methods once service instance is registered ?

Create a primary key in your tables then refresh the service instance

 

3. Is there a way to delete these service objects only without deleting the service instance?

I am not sure what do you mean, can you give more details?

 

Badge +9

HI Mustafa,

 

Thank you for your response. I realized that after I assigned primary key  to a field in table, refreshed the service instance and it shows all the CRUD methods.

 

3. Is there a way to delete these service objects only without deleting the service instance? I believe once service object of the table is created, you can not delete it unless you delete the database table itself. Each table creates one service object. However, you can create any smartobjects out of that service object  and can be deleted too. I am getting the point or missing something.

 

Thank you once again.

Userlevel 5
Badge +16

Hi IPO,

 

Glad to know this,

 

Regarding to the third question, you are correct, you can't delete the service object. you have the point :)

Userlevel 5
Badge +16

Hi IPO,

 

Glad to know this.

 

Regarding to the third question, you are correct, you can't delete the service object. you have the point :)

I'm having the same issue.  I checked the two new tables I created, and neither have dots in the name.  One had a primary key, the other didn't.  I added a primary key where it didn't exist, and refreshed the service instance.  Still nothing but List.  I also tried refreshing the service object (SQL Server Service) and then refreshed the service instance.  Still nothing but List for either new table.  All the rest of the tables have all the necessary methods.

 

Any recommendations?

Userlevel 5
Badge +18

1.  After refreshing the Service Instance, does the Service Object have the CRUD methods?


2.  A SmartObject will usually not reflect the Service Object unless it is regenerated/recreated or manually edited to have these methods.


3.  If recreating, the systemname and guid should remain the same; if this SmartObject is currently in use somewhere.


Just on the phone with Ted.  He showed me where I'd gone wrong, which is that I hadn't completed creating the primary key for the table.  It took an instruction near the end of the CREATE statement similar to:

 

 CONSTRAINT [PK_Status] PRIMARY KEY CLUSTERED ( [Status ID] ASC)

 

Thanks to both of you.

Reply