Skip to main content
Nintex Community Menu Bar
Question

Dynamically assign parent model to file upload component

  • July 10, 2024
  • 3 replies
  • 0 views
  • Translate

Forum|alt.badge.img+5

Is there a way I can dynamically assign a model to a file upload component?

I am trying to create a generic page to display attachments, which will also allow users to upload new attachments and use this page as a page include across a variety of object record detail pages.

Zach helped me here https://community.skuid.com/t/get-sobject-name-from-salesforce-id with building a map of salesforce key prefixes and the corresponding object names dynamically. I am making use of this map to check against the id of the salesforce record, determining the sObject and am able to build the object model on the fly using javascript. Now, I have a file upload component on my page, to which I want to assign this newly created model.

Is there anyway I can do this? Is there any documentation on this?

Did this topic help you find an answer to your question?
This topic has been closed for comments

3 replies

Forum|alt.badge.img+10

Yes. It sounds like you’re talking about the parent model chosen on the File Upload.

The documentation can be found here:
https://docs.skuid.com/latest/en/skuid/components/file-upload/index.html#file-upload

Translate

Forum|alt.badge.img+5
  • Author
  • 32 replies
  • July 10, 2024

UPDATE

So this is what I did. I created a generic model (called it GenericModel) on the account object (because the file upload component needs a parent model assigned to it).

And then on page load, I have a snippet that changes the ‘objectName’ property to the object of the salesforce record that was passed and also set a condition on the model to the id of the salesforce record that was passed to the page include. 

And that did the job!

I know I am getting the result that I want but would this be the right approach or is there a better way to achieve this?

Translate

Forum|alt.badge.img+10

Thank you for posting your solution!

Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings