Hi Scott,
Â
Without seeing the steps to configure the smartObject, The problem may exist in the actual creation of that object. Â Creating an object in K2 Studio typically will not create appropriate SQL methods on it's own. (with the exception of using the Smartobject Service Tester)
Â
By default, when you go to create a new SmartObject, K2 Studio assumes a SmartBox object is being created. Â We need to delete the smartBox methods and add our own:
Â

Â
Once I click remove all, it clears the methods listed in the bottom right, and we can begin adding new ones by clicking the Add button to the left of "Remove All"
Â
Moving through the wizard, I'm creating a list method for my list (of potatoes).
Â

Â
Now, we drag the service object method from the context browser for the appropriate command (List in this case), and ensure all the settings are as they need to be. Â I hit create all to map the fields in this case, depending on your implementation, you may want to do this manually.
Â

Â
And the next step finishes the wizard. Â From there, you've created a list method. Â You'll want to repeat this for create, delete, read, and update, as needed.
Â
With the service object tester, you have little control over the process, but you can use that to autogenerate a SmartObject for testing purposes by right clicking the table.
Â

Â
Now, if you already have created these and the issue persists, I'll need some more details as far as how the smartobject is currently configured and what methods are set up.
If anyone runs into this in the future.Â
Â
 It’s outlined in this help documentation:
Â
https://www.k2.com/helppages/k2blackpearluserguide4.6.7/webframe.html#tables.html
Â
The script (WithCRUD])Â from that help doc and was able to extract all methods.
Â
CREATE TABLE Tdbo].LWithCRUD](
    Â
     bDescription] Ânvarchar](50) NOT NULL,
     nvarchar](max) NULL,
     NIntValue] rint] NULL,
CONSTRAINT nPK_WithCRUD] PRIMARY KEY CLUSTERED
(
    Â
)WITH (PAD_INDEXÂ = OFF, STATISTICS_NORECOMPUTEÂ = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKSÂ = ON, ALLOW_PAGE_LOCKSÂ = ON) ON SPRIMARY]
) ON PRIMARY]
It seems that question has been answered but just wanted to add some relevant information here. First just a quote from K2 documentation:
Â
Â
"All the CRUD (CREATE, READ, UPDATE, DELETE) methods including LIST will only be created as Service Object methods if there is a primary key on the table. If there is no primary key on the table only a List method will be created." (source)
Â
Also another thing to keep in mind is that you should not use dot in your table name, otherwise only Read method will be exposed by SMO created from this table. The other day I spent loads of time trying to figure out why I have only Read method exposed by my SMO until I find out that it was down to dot in source table name.Â
Dear Mikhail,
Â
Its regarding your second point "don’t use .(Dot) while creating the table"
Â
Can i know how exactly we are not supposed to use?
Â
Thanks for sharing more details.
Â
Regards
Srinivas Kondapalli
Hi @Amar,
Â
There is a known issue which exist since 4.6.7 at least and up to latest versions - when you create table in SQL database which contains dot symbol in table name and then create SQL Server SMO based on this table only List method will be exposed for this SMO. So if you create table named "Source.Table" you will get only List method in SMO based on this table, but once you rename it into "SourceTable" (without dot) it will expose CRUD methods. Dot between schema name and table name doesn't have any impact here - we speaking about table name only. So "Dbo.SourceTable" (where "Dbo" is schema name) will expose CRUD methods without any issues.