Open thomashager opened 5 years ago
Looks like you have a typo in the parameter data when referencing the customFn. You have:
customFn=Samples.Filter.FilterOnOpportunity
but based on your code it should be (plural filters):
customFn=Samples.Filters.FilterOnOpportunity
Thanks for the quick help! I changed so the reference is now correct, but I must have made some other mistake as well because it is still not filtering. I have tried to double check everything, but still not filtering. Any other ideas?
Could be multiple issues and hard to say without access. A few things to verify:
Hi, I found a few errors in the log - but after working through it a bit it looks clean now (see below);
I added a log call as you proposed that made it into the log ("test log") in the picture. I actually took the change page part out of it. I guess that was just a "copy" mistake. When I look in Power BI Desktop for constructing the reports the name of the table is Opportunity and also the Column for the Opportunity rec ID as far as I can understand. They both have a capital O so it looks right so far.
Still not filtering though. Feels like I'm getting closer though.
Any additional ideas?
Many thanks!
Today I tried a few more things and one of the errors in the log came back. Maybe this can be the issue;
Hopefully it means something more to you than me...
Hi, I'm truggling to get the filtering of a report on my Opportunity form to filter according to the active record. I'm sure I'm just missing something that would be obvious if you know your way around things a bit better. Would really appreciate some guidance. This is what I have;
/**
report.on("loaded", function (loadedEvent) { report.removeFilters(); // For some reason this needs to be done before setting page filters (August 2018)
}); }
I have referenced it in the config; // Sample: custom_scripts: ["../../newmyfilter?ver=1", "../../demo/powerbi/filters/account.js?ver=1"] custom_scripts: ["https://tocdev.crm4.dynamics.com//WebResources/new_Samples.Filter.FilterOnOpportunity"] };
I have added a web resource to the Opportunity form with the following custom parameter data; type=report&id=2dba7575-b09d-4193-94b8-e2674169950e&groupId=566c3e94-3cda-48ff-aaad-362633f833c8&pageName=&showFilterPane=true&showNavPane=true&customFn=Samples.Filter.FilterOnOpportunity
The reports shows but is not filtered.
Have been struggling for a while and would really appreciates some idea on what I'm missing. Many thanks!