Hi,
I had develop an order management apps with customer portal. Our customer has hierarchy i.e: Company A with Agent A1,A2,A3 and Company B with Agent B1,B2,B3. Please refer to attachment for the overview.
Record entry is via API, customer portal apps or sometimes record is entered by our staff (zoho user) on behalf of agent via apps.
Every record will always refer to a specific Company and Agent via record lookup and customer portal lookup (zoho.loginuserid). Hence an order form will have 2 record lookup and 2 user lookup.
So i had no problem for this stage. Everytime a record is entered, it will always refer to specific Agent and its Company.
My problem is to make the record visible to a specific "Agent" and "Company".
For example; A report is set to filter:
Agent == zoho.loginuser || Company == zoho.loginuser
But what happend is;
if the record is entered via customer portal -- only "Agent" & zoho user will see the record
if the record is entered via API -- only zoho user will see the record
if the record is entered by our staff -- only zoho user will see the record
from my understanding, this is related to Added_User and record_owner.
IF i select one of customer portal field (Agent/Company) as record owner,
it will visible on that customer portal.
Obviously i cant select both field as record owner.
To recap, Main record entry is via API. So if i can make this work even via API only, I can force our customer and staff to only insert a record from our website. Added_User issue can be diminished.
Please guide me to make this work as shown in hierarchy. Thanks