Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display number instead of name on popup for case, contract workorder ... #37

Closed
Tracked by #5
dufoli opened this issue Mar 24, 2024 · 2 comments · Fixed by #110
Closed
Tracked by #5

display number instead of name on popup for case, contract workorder ... #37

dufoli opened this issue Mar 24, 2024 · 2 comments · Fixed by #110
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dufoli
Copy link
Owner

dufoli commented Mar 24, 2024

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
@dufoli dufoli mentioned this issue Mar 24, 2024
96 tasks
@dufoli dufoli added this to the 1.26 milestone Apr 28, 2024
@dufoli dufoli modified the milestones: 1.26, 1.27 May 8, 2024
@Dufgui Dufgui added the enhancement New feature or request label May 18, 2024
@dufoli dufoli closed this as completed May 21, 2024
@dufoli dufoli reopened this May 21, 2024
@dufoli
Copy link
Owner Author

dufoli commented May 21, 2024

@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)

@dufoli
Copy link
Owner Author

dufoli commented May 21, 2024

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

@dufoli dufoli closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants