Cant trigger pdf generation

0
Hey, I’m having issues triggering my microflow to generate a pdf. This is my setup: - I need data from four entities in my pdf: Userinfo, expense, mileage expense and other expense. I’ve also set up a system file document entity which is associated to all those four entities. - I’ve created the microflow which creates the system file document, retrieves lists of the four entities from the current user, generates the pdf using the four data views and then finally downloads the file document     - I’ve created a document template with the four data views and some test data   - Lastly, I added my button which calls my microflow in a nested dataview so all my paramaters are available    When I run my application to test, the button is grayed out and unclickable. For testing purposes I set the visibility to ignore security and i double checked entity access. Nothing wrong on that end. I also don’t have any errors in my application. What am I missing in my setup to make this work? Thanks
asked
4 answers
0

Eson,

The button is grayed out because at least one of the 3 nested entities are not available on the page.  This could be because:

  • ApplicationUser is not associated to the ExpenseNote entity (which I think is on your page but does not appear in your screenshot)
  • There is no MileageAllowance object selected in grid1
  • There is no OtherExpenses object selected in grid 2

Hope that helps,

Mike

answered
0

Hi Mike,

I indeed found out that the way i set up my nested entities is the reason why i’m having this issue. Can you give me some insights in how i would have to set up the nested data views to put my button in for this to work?

I need data from ApplicationUser, OtherExpenses, Mileageallowance and ExpenseNote. I would think that i can access all this with the current associations in my domain model or am I wrong on this?

answered
0

Eson,

It looks like if you pass ExpenseNote into the microflow, you can retrieve ApplicationUser, MileageAllowance and and OtherExpenses from that object.  That’s the approach I would take,  Just pass in an ExpenseNote object and retrieve the required objects using association retrieves.

Hope that helps,

Mike

answered
0

I tried retrieving everything through the associations but all data which i want to retrieve through associations in the document template does not get filled with info. Only the attributes located on the ExpenseNote entity are shown in the pdf.

When I add an extra data view with for example the ‘MileageAllowance’, i have to add the paramater to the microflow and thus also put by button in a data view which refers to ExpeseNote_MileageAllowance. Doing this makes my button unclickable again because of the reason you stated above.

Do I have to change the way my page is set up to make this work correctly?

answered