update from 2020 r2 to 2022 r2 and got the following error in the following code.

Kindly assist.
All responses will be highly appreciated.
update from 2020 r2 to 2022 r2 and got the following error in the following code.

Kindly assist.
All responses will be highly appreciated.
Best answer by Django
Just having a quick look I see that SM_CRCaseMaint is a Graph Extension of CRCaseMaint. The error message is tell you that you need a variable (object) that is of type SM_CRCaseMaint and then that variable has a method you can call.
Looking at the declaration of your method:
private void CreateServiceOrderDocument(CRCaseMaint graphCRCaseMaint, CRCase crCaseRow, FSCreateServiceOrderOnCaseFilter fsCreateServiceOrderOnCaseFilterRow)I see your first parameter is a variable of type CRCaseMaint.
So I’ll take a guess that you need a line of code something like:
SM_CRCaseMaint caseMaintExt = graphCRCaseMaint.GetExtension<SM_CRCaseMaint>();
caseMaintExt.UpdateServiceOrderHeader(
graphServiceOrderEntry,
Base.Case.Cache,
crCaseRow,
fsCreateServiceOrderOnCaseFilterRow,
graphServiceOrderEntry.ServiceOrderRecords.Current,
true);I’m not certain but I think this is the direction you need to take.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.