Skip to main content

Hi


I have been going at it for hours and out of ideas as to why this is happening.


I have a SO for which I have created 3 methods (Update, Load, GetList)


Update works fine.


When I call Load (both from SO API in code behind and SO tester) I get an error 'Object reference not set to an instance of an object. SmartCode.SmartObject.Client. The Load method is correctly mapped to an underlinig SharPoint list and accepts ID as a parameter. The SharePoint list item exists with a correct ID.


When I call 'GetList' it works from SO tester but in my code I get same error message as above.


I have a generic helper class which is called by various SO to get loaded, updated, etc so the code is correct as it correctly loads other SO.


Can you please help!!!


Thanks


Lena


 


 


 


 


 

Hi Lena,


I cannot see anything wrong in your code.


The SharePoint SmartObjects require a method parameter to specify the SharePoint URL. In your code you do not specify any input parameters and I think this might be the reason why you are getting the Object Reference errors. I'm not sure how it works for the Update method however, but see if this is not maybe the cause.


Regards,


Hi Lena, have you verified your .publish file, sometime it happens that although you have correct method name and signature etc but same doesn't present in .publish, check once.


Cheers, Subro


Reply