Unable to assign a value in LightSwitch 2012 project -
i'm trying implement following code lightswitch 2012 project. i'm getting error when try assign this.expensereport value. error reads "property or indexer 'lightswitchapplication.expensereportdetails.expensereport' cannot assigned -- read only".
partial void expensereportdetails_initializedataworkspace(list<idataservice> savechangesto) { // write code here. if (this.expensereportid == -1) // -1 means new report { // create new expensereport this.expensereport = new expensereport(); } else { // existing expense report this.expensereport = this.dataworkspace.applicationdata.expensereports_singleordefault(this.expensereportid); // set name of tab default field on entity this.setdisplaynamefromentity(this.expensereport); }
the implementation of expensereport not have set property, get propery. means can not run following line:
this.expensereport = this.dataworkspace.applicationdata.expensereports_singleordefault(this.expensereportid); can change expensereport writable?
Comments
Post a Comment