nawforce / apex-assist

VSCode extension for Salesforce Apex development with support for offline validation.
Other
18 stars 2 forks source link

Unknown field 'ShouldAbortRun__c' on SObject 'Schema.RollupControl__mdt' #5

Closed jamessimone closed 3 years ago

jamessimone commented 3 years ago

If the field being referenced is defined in your sfdx-project.json but it's not defined in the packageDirectory where the field is being referenced, this error pops up. I almost convinced myself to copy the metadata folders where I am referencing these fields purely to get rid of this error, but I wanted to check with you first.

nawforce commented 3 years ago

Thanks for raising this, It's a bug in the way I am handling CMDT, the extension at plugins/CustomObjectRollupLogger/objects/RollupControl__mdt is being treated as though it was defining a new CMDT type which then has the effect of hiding the original fields.

I will take a look at it today and see if I can get an update out as this might hit quite a few people.

jamessimone commented 3 years ago

Thank you, appreciate you and the work you've put into this as always!

nawforce commented 3 years ago

That should be fixed now in 1.3.2.

I have added some warnings against sfdx-project.json for when packaged metadata that is not accessible. A couple of these warnings showing apex-rollup you could get rid of by using the package & versionNumber format to declare the dependencies.

Practically it makes no difference at the moment but in later versions I expect to tighten up the processing model so dependencies are considered. Currently the analysis is still using 'deploy order' to structure things, so as long as your packageDirectories are ordered well it should resolve OK.

jamessimone commented 3 years ago

awesome, I'll have a look. clearing out the last of those warnings will be awesome!

jamessimone commented 3 years ago

Can confirm - this worked great! Thanks again.