0

I am trying to access financial goal object from my financial cloud using apex command as follows:

Map<String, Schema.SObjectType> allSObjects = Schema.getGlobalDescribe();     
for (String sObjectName : allSObjects.keySet()) {
  if (sObjectName.startsWithIgnoreCase('fi')) {
    System.debug('[LOG] SObjects inside getSalesforceFields:'+ sObjectName);
  }
}

The FinancialGoal object is fetched successfully when we run these commands in anonymous Apex. However, when we run these commands in VS Code and deploy them, the FinancialGoal isn't fetched. I have tried changing the sharing settings for this object, but nothing seems to work for me. Additionally, there are some other objects that are missing. If I am doing anything wrong, kindly correct me. Any help would be appreciated. Thank you.

1
  • 1
    I found the solution. We just needed to update the API version of meta files in VS Code. It should be the latest Salesforce API version. In my case, I changed it from 58 to 60.
    – Komal Riaz
    Commented Mar 20 at 6:03

0

You must log in to answer this question.