Anyone know a better way to refactor this code so it won't be hardcoded PersonAccount? Instead, it should be parameter passed in?
String personAccRecTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('PersonAccount').getRecordTypeId();
I have read this blog and with a SOQL query might work but I am still thinking if there is a better approach that won't break? http://smukov.github.io/blog/2018/06/09/Record-Type-Id-By-Developer-Name/