when plugin is install at that time i taking data from product to my plugin table in 4.1

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
getting error like this "Invalid object name '@p0'"

this is my code in install plugin objectcontext file

public void Install()
        {
            //create tables
            this.ExecuteSqlScript(this.GenerateCreateScript());
            this.SaveChanges();
            var logTableName = this.GetTableName<tablename>();
            

            
            Database.ExecuteSqlCommand($"INSERT INTO [{logTableName}] (ProductId, Status, IsDeleted, InTime,
            ActionType) SELECT Id, 0, Deleted, GETDATE(), 'Create' FROM [Product]");

            this.SaveChanges();
        }
5 years ago
If you run that SQL command directly in a tool like SSMS, does it work OK?
5 years ago
Hello,

Please refer this url.

You will get solution of your problem.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.