I am trying to complete a development project but have been a bit stumped. None of my changes break it, but none meet the need. Essentially I have an activites page part that is based off of a cue table. This page shows the status within the sales/purchase cycle based on counting an option dropdown. The goal is to check to see wether the logged in user is a salesperson, and if so filter the cue results by their salesperson code. The cue draws from the Sales Header table so this shouldn’t be an issue.
My most recent attempt was on the form init to:
salesp.SETRANGE(salesp.Name,USERID);
IF USERID = salesp.Name THEN
salesheader.SETRANGE(salesheader.“Salesperson Code”,salesp.Code);
Thank you for any input you may have on this subject.
Also, you’ll need to create a FlowFilter field in the cue table. You will then need to add this FlowFilter to each of the FlowFields (cues that are displayed on the page in this case) so that it can take the salesperson into account.
Take a look at page 9030, Account Manager Activities, in the OnOpenPage trigger to see how the base product uses filters to control the cue numbers.
Sorry for the long reply, was out of the office for the weekend. So even though its a flowfield that you are setting the filter in you use setfilter? I went in and did that and will see if the changes work.