You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it is hard to found the list of field to replace Name on some object.
issue is that isNameField on FieldDefinition is sometimes false whereas we have a name field but no other field (example with changeEvent).
An analyze on that show me that it is really a mess:
518 object have no Name field (event, share, hsitory, feed....)
152 object have a name field but isNamefiels is false... WTF
then we have a lot of DeveloperName and few other kind of pattern. I can not store it on SFI so best is to try and if no name catch exception and run another request to get FieldDefinition with isNameField = true
Field name
count object without is name field
count object with is name field
AssetRelationshipNumber
1
AssociatedLocationNumber
1
CaseNumber
1
ContractNumber
2
DeleteLog
1
DeveloperName
66
Domain
1
EventRelayNumber
1
FriendlyName
1
FunctionName
1
InvoiceNumber
1
Label
1
LineNumber
1
LocalPart
1
Name
152
286
OrderItemNumber
1
OrderNumber
1
ProcessExceptionNumber
1
QuoteNumber
1
SolutionName
1
Subject
7
TestSuiteName
1
Title
10
The text was updated successfully, but these errors were encountered:
@Dufgui I reopen this issue.
restCallForRecordDetails have an exception because name is not found so it call it again without name.
Best, is to use describeInfo to get list of field of object:
import {DescribeInfo} from "./data-load.js";
let describeInfo = new DescribeInfo(this.spinFor.bind(this), () => {
//TODO call here rest api and filter field with same test to get namefield
//then model.didUpdate()
});
describeSobject(useToolingApi, sobjectName)
another option is to use SELECT FIELDS(STANDARD) FROM Case
if name failed. So yes it will be slow because we get all field but it is on a single record so it is enough and it avoid describeinfo to get more info
it is hard to found the list of field to replace Name on some object.
issue is that isNameField on FieldDefinition is sometimes false whereas we have a name field but no other field (example with changeEvent).
An analyze on that show me that it is really a mess:
518 object have no Name field (event, share, hsitory, feed....)
152 object have a name field but isNamefiels is false... WTF
then we have a lot of DeveloperName and few other kind of pattern. I can not store it on SFI so best is to try and if no name catch exception and run another request to get FieldDefinition with isNameField = true
The text was updated successfully, but these errors were encountered: