Timeline for How to get pagelayout assigned to a non admin users in apex
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 2, 2023 at 16:28 | comment | added | Renato Oliveira | I don't get it, you want to know which page layout is assigned to the user, or you want the fields that are to be shown to the user? If it is the latter, you should look up about the UI API. It should return the fields available to the current user for you to build your record page/form the way you need. Maybe you might need to update your original post with the real use case/end result you want with this. | |
Aug 2, 2023 at 15:50 | comment | added | Manjot Singh | I think there might be some confusion in my question. I am not creating any thing new or assigning any new value. I am just trying to get pagelayout that is assigned to a user for a particular object. My use case is i am overriding NEW button for an object. Then i am opening a LWC page where i am displaying fields based on pagelayout that is assigned to user. I am not using lightning record edit for that because we are not displaying all the fields that are there in page but only few fields based on some logic. | |
Aug 2, 2023 at 11:58 | comment | added | Renato Oliveira | Well, yes. The Tooling API's purpose is to provide a way to progamatically access your org's schema and settings, not to change data in the org. Users' records are considered data, so they are not covered by the Tooling or Metadata APIs. Like I said in my answer post: there's no practical way in doing this. I would suggest you to give up on this requirement, actually. | |
Aug 2, 2023 at 8:33 | comment | added | Manjot Singh | I am using tooling api only to get page layouts assigned to a user. Issue that i am facing is that tooling API doesn't work for the users. If we want to query ObjectId from CustomObject using tooling API that doesn't work for non admin users. If i don't have ObjectId i can't query profileLayout object with tooling api. | |
Aug 1, 2023 at 18:28 | history | answered | Renato Oliveira | CC BY-SA 4.0 |