Named Credentials and/or You have uncommitted work pending. Please commit or rollback before calling out
how to solve callout error? You have uncommitted work pending. Please commit or rollback before calling out