on 2021 Dec 21 1:45 PM
Hello All,
let me first explain business case before I ask technical question.
We do have list of products. In the dedicated tab in CUSTOMER user wants to see whole list with indicator whether the product is used by the customer or not.
I will consider following:
A: Left Table with all products ids
B: Right table with Product ID and account id. If there is entry in this table than it means product is used.
Left outer join which shows all products from table A and in case entry was found in table B ( = product is used), then indicator like "yes"
Now the question:
is this something possible to build in C4C (SDK) ?
I have considered one object which has
[Label("Product ID")] element ProductID : ProductInternalID;
node Accounts [0,n]{
[Label("AccountID")] element AccountID : BusinessPartnerInternalID;
}
In the object I have a list of products and in node Accounts I list account which are using it.
My challenge is to present all of this in one table (AdvancedListPane) where:
COLUMN1: ProductId , COLUMN2: Yes/No (depending on the fact if AccountID is present or not).
When I try to build Query, then it can have AccountID as searchable field, but not on result list. Result list can only display ProductID.
Maybe I can manage two tables: one with used products (select using Account ID) and one not used products, but can it be combined into one table?
regards
Rafał
Request clarification before answering.
Hello Jameel,
thanks a lot for your advice.
I have tested this and this will not solve my problem (or I misunderstood something).
Let me explain:
Following the advice I created data source from my object (has 3 elements: Product ID, Account ID and Usage flag). After this I created Joined Data Source from two sources: Product Master Data and data source I created from my object. Join type " Left Outer Join" and connection via Product/Material ID.
I created report from this and it works very well. I see list of all products and accounts which use it.
But that's not all. The idea was: when I open customer record, I would like to see in dedicated tab list of all products with indicator (usage flag was created for it) whether the product is used by given customer. I do not want to see which other customers use the product (this is what report provides if I do not provide any selection).
But in order to achieve it, I need a selection in my report : customer (account) ID. And here we come to the problem:
Once I select Account ID in my report , the list contains only products which are used. And that's wrong.
The root cause is quite obvious: my table which contains account ID and product ID lists only used products. It does not contain products which are not used. Otherwise I will always need to copy full list of products for each account and indicate if it is used or not. And that's something I wanted to avoid, because if this is needed I do not need any join at all. I can simply use query on my object ( = show me all records for given account ID).
Example:
I have 3 products: A,B,C and two customers (accounts) 1 and 2.
My table for account/product combination will contain entry "1, A, Yes" (Customer: 1, Product : A, Used: Yes).
In that case report for account 1 lists only product A . That's wrong, since I want also see B and C.
If I add two rows: "1, B, No" and "1, C, No" than I will see all records with indicator whether product is used or not.
But this is not practical: imagine somebody adds new product. I will then need to add many entries (each for for separate account) into my table.
Do you think what I want to achieve is possible in C4C without building a table which contains all combinations?
regards
Rafał
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jameel,
Users want to indicate it manually, So if I have tab with list of the all products they want to indicate there what they use. Tab will be added to CUSTOMER as Embedded View.
regards
Rafal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rafal,
If the data is persisted within an object (either in a field or a tickbox if users do it manually) you should be able to create a custom report by standard. Create a combined data source (Data Source 1= Product; Data Source 2= Accounts) and build your report up manually. Documentation here. A joined data source should also work from what you described.
If your data is not being persisted, it would be tricky.
Regards,
Jameel
User | Count |
---|---|
18 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.