Hello Everyone,
I have a method that I am calling them in different graphs. To make this happen I have used Reflection and dynamic parameters. a part of my method require creating a List of ApproveInfo. If I copy and paste my code to each graph it works just fine but when I call it in the Generic Method I am creating, raises the below error:
“Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: ''object' does not contain a definition for 'ToList''”
using PX.Api;
using PX.Common;
using PX.Data;
using PX.Data.EP;
using PX.Objects.EP;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using static UDApprovalWorkflow.EPApprovalAutomationHelper;
// I get error on the second line of my method
List<ApproveInfo> approvalSealedData = new List<ApproveInfo>();
approvalSealedData = Approval.GetApproversFromNextStep_Extension(Document, assignmentMap, stepBase.Sequence, Action).ToList();
What I am doing wrong? Any help is appreciated. As mentioned if I copy the method to each graph it works just fine.