Concatenate fields from related N:N custom entity - concatenation

For Dynamics 365 v8.2
We built a custom entity called "Product Buyers" that has a N:N relationship with Accounts via the Account ID field. The custom entity also has a field that is a lookup to Products (it holds the product name). We created this because we need three unique relationships to each Product - one for the Account and two tied to other Contacts aside from the main contact at that Account.
So on each Account record, we have a table that shows the "Product Buyer" info, which includes a column called "Products" that has that lookup field from the Product Buyers entity.
Here's the question: How do we create a single field on the Account record that is essentially a concatenation of the Product fields from all related "Product Buyer: records?

You cannot do this OOB.
Create a multiline textbox field & do a custom concatenation whenever new record added or removed or updated in N:N entity. Plugins needed for real-time.
Or you can have a SSIS+Kingswaysoft package to run periodically (we call this Rollup engine) to update that Rollup textbox field.

Related

MS Access - column choice based on the other column

I'm creating a simple database which will allow users to manage cars and contains data like registration number, brand, model, dates of upcoming maintenance controls... (in my country marka = brand)
I have created relations like this:
In t_podwozie I have created link & relation columns fk_marka, fk_model. I need fk_model choices to be limited by my choice in fk_marka.
I have tried to use a query connecting brands and model (INNER JOIN) but then I can save only one column in t_podwozie. Any advice?
Both link & relation columns consist of id column and name column (id's are hidden)

MS Access: How do I populate other fields in other subforms using a form?

I have the following tables with fields that are common across them. E.g.
Branch Table
Retailer ID (PK)
Retailer Name
Address 1
Address 2
Internal Table
Retailer ID (PK)
Retailer Name
Internal ID
Bank Accounts
Retailer ID (PK)
Retailer Name
Bank Code
Bank Account Number
I have created a "master" form using Branch Table and including the forms of Internal Table and Bank Accounts as subforms. My intention is to have a user type in the Retailer ID and Retailer Name fields to prevent repeated manual entries of the same fields. Under the Property Sheets, I have linked the fields using Link Master Fields and Link Child Fields. However, it seems that the form is not performing as intended.
After entering test data for Branch Table (the master), moving on to the fields for Internal Table results in the following error:
"The Microsoft Access database engine cannot find a record in the table with key matching field(s) . (Error 3101) " Explained as such "In a one-to-many relationship, you entered data on the "many" side for which there is no matching record on the "one" side. For example, this error occurs if you join a Customers table and Orders table on a CustomerID field, and then add an order using a CustomerID that does not exist in the Customers table."
Because of this, I can't automatically add another entry for the other tables.
Field Retailer ID of the child tables cannot be PK.
Create another field (Autonumber) in theses tables to be the PK.
Then go to the GUI designer for Database Tools, Relations, and set up referential integrity between Branch table and the two child tables using the Retailer ID fields. These will now, in the child tables, hold the FK to the master table.

relations variable of content-type drupal 7

I have created a content type called Customer.
I am creating other content called reports.
A customer has several reports.
How could create a variable in the content-type reports relations with the customer's name on content-type customer?
thanks
You should use Drupal Entity Reference module. Download, install and enable it, and then, you have to add a new field in content type "Reports", namely customer, of type "Entity reference" (this field type was added by Entity Reference module). Once you have added this field, you have to choose which kind of nodes can be referenced. Select Customer in the checkbox list.
You can also choose the way you want to determine which customer owns a report. You have several options: selection checkboxes, autocomplete field, etc. Take a second to determine if a Report should be linked to one or more customers. In case it must be linked to a single customer, make sure to limit the number of fields to one.
Using this module you will not only link the customer's name to the report, but you will also link the whole entity. You will be able to display the customer name as a link to the customer node.

Database Tables - To decouple or not?

Is it better to create tables that store a lot of data that are related to an entity (User for example) or many tables to store said data?
For example:
User Table
Name
Email
Subscription Id
Email Notifications
Permissions
Or
User Table
Name
Email
Subscription Table
User ID
Subscription ID
Notification Table
User ID
Receives?
... etc
Please consider code in this as well, or I would have posted to ServerVault.
From a relational design standpoint what is important is the normal form you're aiming for. In general, if the "column" would require multiple values (subscription_id1, subscription_id2, etc) then it is a repeating group, and that would indicate to you that it needs to be moved to a related table. You've provided very general table and column notes, but taking a cue from the fact that you named "Email Notifications" and "Permissions" with plurals, I'm going to assume that those require related tables.

Create multiselect lookup in salesforce using apex

I want to create a multi-select Contact Lookup.
What i want :
When user clicks on a lookup then he should be able to select multiple contacts from that.
What i have done:
I have created an object and a field inside that object using both
"Lookup" and
"MasterDetail Relationship" and
"Junction Object"
When i try to use this Field for any input text/Field then it always provides an option to select only one value from lookup but i want to have an option to select multiple.
Even in the Junction object i have created 2 master-detail relationships still lookup allows only one value to be selected.Moreover it makes the field mandatory which i don't want.
Links that i followed:
http://success.salesforce.com/questionDetail?qId=a1X30000000Hl5dEAC
https://ap1.salesforce.com/help/doc/user_ed.jsp?loc=help&section=help&hash=topic-title&target=relationships_manytomany.htm
Can anybody suggest me how to do this.
Its same as we use Email CC/BCC under Send Email option for any Lead.
Even you use a junction object a lookup is just that, it references (looks up to) one other record: when you create a record on the junction object you still have to set each lookup individually and you're still creating only one record.
Master Detail relationships are essentially lookups on steroids, one object becomes the child of the other and will be deleted if the parent object is deleted, they're not going to provide an interface to lookup to many records at once.
If you're not a developer then your best bet is to either just create on junction object record at a time, or look into using dataloader. You could prepare your data in Excel or similar and then upload all the records into Salesforce in one go.
If you are a developer, or have developers at your disposal, then what we've done in the past is create a Visualforce page to do the job. So if, for example, you wanted to link a bunch of contacts up to an Account, we'd have a single account lookup field on the page, then some search fields relating to fields on the contact. Using a SOQL query you can then find all contacts matching the search parameters and display them in a list, where you may want to provide checkboxes to allow the user to select the contacts they want. Then it's just a case of looping through the selected contacts, setting their Account field to be the chosen account.
There are areas in Salesforce (such as the send Email functionality you mentioned) where it's clear to see that bespoke work has been done to fulfil a specific task — another instance of what you want is in the area where you can manage campaign members. This is the model I've copied in the past when implementing a Visualforce page as described.
Good luck!
For adding multiple junction objects at one time, the only solution we have found is a custom Visualforce page, as described by LaceySnr.
For a slightly different problem, where we need to assign many of object B to object A, We have trained our users to do this with a view on object B. We are assigning Billing Accounts (B) to Payment Offices (A). The view on Billing Account has check boxes on the left side. The user checks the Billing Accounts to be assigned, then double-clicks on the Payment Office field on any of the checked rows. A pop-up asks if you want to update only the single row or all checked rows. By selecting 'all checked rows', the update is done to all of them.
The view is created by the user, who enters the selection criteria (name, address, state, etc.). All user-created views are visible only to them.

Resources