I’m looking to use the Workspace Smart component. After creating the template.hbs file and deploying it on our backend, I tried entering the URL in the template URL field as “/public/smart-components/amount/template.hbs” and also tried “public/smart-components/amount/template.hbs”. However, I keep receiving an error, and the logs show the following:
[backend_url]public/smart-components/amount/template.hbs’ from origin ‘https://app.forestadmin.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
Expected behavior
Expecting for my smart component to load my template
Thank you — I got that to work in the same category for smart components. The issue I’m now facing is with adding a smart action, as described in the documentation I found.
Blockquote: For triggering a smart action it’s the exact same code as inside a smart view. Please follow this link.
For example, in my workspace, I have a collection called processRecordCollection. I’m able to pass in the selected record ID from that collection — I’ve confirmed this by logging it out.
However, the problem is with the @collection part. In a typical smart action, the collection is already known because the smart view is created within that collection. But in a workspace, you can have multiple collections. So, in this case, how do we pass the collection into the smart action?
Hi thank you this worked, one last thing to pass in a value to the smart action it doesn’t seem to be working as when I try this code I get this error “A value is required for field Note”