Epicor Function Custom Code Db.Validate issue

Hi,
I go the error below when trying to use Db.Validate() within Epicor Function custom code. I used this many times successfully in BPM custom code. Does anyone know the assembly I need to include when calling the Db.Validate() method in Epicor Function?

‘ILibraryContext’ does not contain a definition for ‘Validate’ and no accessible extension method ‘Validate’ accepting a first argument of type ‘ILibraryContext’ could be found (are you missing a using directive or an assembly reference?)

Thank you,
Peter

Try SaveChanges() instead.

3 Likes

Thanks for the response but now it said "doesn’t contain a definition for ‘SaveChanges’.

1 Like

Do you have your settings set to allow writing to the Db?
image

1 Like

No, I didn’t. Looks like I need to check the updatable check box for the table also to make the error goes away.
Thank you very much for your help!

1 Like