This project has moved. For the latest updates, please go here.

How to unlink a record in subgrid

Jul 6, 2016 at 7:30 PM
Hello,

Currently when i click on delete option on the subgrid to unlink a record, the complete record is being deleted. For example, i created a subgrid with accounts related to opportunity in opportunity form. I am able to add the accounts in the sub grid and have five other columns with yes or no. But when i clicked on "x" mark to unlink the account from the opportunities the complete record form accounts is also being deleted. Am i doing something wrong? Can someone help me.

Thank you very much!
Coordinator
Jul 6, 2016 at 9:48 PM
Hi,

The 'x' button is intended to be used to delete a record.

To disassociate/unlink a record;
  1. Using grid configuration, add the associated lookup field (opportunity) to the grid columns
  2. Go to an opportunity form, in the grid, find the record you want to unlink, click the lookup cell (new column added in step 1) to activate the grid lookup editor
  3. Clear the text inside the grid lookup editor textbox and press the enter key. If auto save is off, then click the save button. This should remove the association (link) without deleting the record (account)
  4. Refresh the grid. the unlinked record shouldn't show up
I will add this as a feature in next release.

Thank you
Jul 6, 2016 at 10:36 PM

Thanks for your prompt response. Just have couple more questions.

First, I am creating a editable grid with data being displayed from account entity and I am placing this grid in opportunity entity. I have also created a 1:N relationship between opportunity and account as I want to add and display only related records. Here is the layout of my grid:

Account Name (lookup from accounts)

Status (dropdown with option set from accounts)

Due Date (date field from accounts)

Est. Revenue (currency from accounts)

Win Probability

Final Result (Won/Loss)

1. Currently, when I hit the “+” button on the grid it is by default adding a new empty account record. How can I look up from existing account records rather than creating a new blank account record.

2. I am sorry I was confused with the below response. Do you have any additional documentation or step by step pictures that I can refer to.

Thank you very much for all the help. You have done an awesome job with the D CRM Editable Grid.

Coordinator
Jul 7, 2016 at 1:00 AM
When you created a 1:N relation ship between opportunity and account, a lookup is created in the account entity that is used to link/associate an account with an opportunity. In my case, the display name of the lookup is "Opportunity" and the name is "new_OpportunityId"

Image

I don't know if you have placed the opportunity lookup on the account form or not.

Image

Image

The '+' button intended to create a new instance of a record. So, to link an existing account to an opportunity, you will need to open the target account and set the opportunity lookup to the desired opportunity.

Image

This is for the last question you asked.

Step 1 - Using grid configuration, add the associated lookup field (opportunity) to the grid columns.

Image

Step 2 - Go to an opportunity form, in the grid, find the record you want to unlink, click the lookup cell (new opportunity column added in Step 1) to activate the grid lookup editor.

Image

Image

Step 3 - Clear the text inside the grid lookup editor textbox and press the enter key. If auto save is off, then click the save button. This should remove the association (link) without deleting the record (account)

Step 4 - Refresh the grid. the unlinked record shouldn't show up

Notes:
The "Account Name" is a text field and not a lookup
You don't need to include the status field. Right clicking on a record will aloow you to see and be able to set both status and the status reason fields.

Thank you
Marked as answer by mehrdadcrm on 7/15/2016 at 11:03 AM
Jul 7, 2016 at 3:13 AM

Thank you very much. I didn’t place the opportunity lookup on the account form. For the first one, generally there are multiple accounts associated to a opportunity (i.e., multiple account record rows in a opportunity) and also each account can be associated with multiple opportunities. For example, accounts ABC, XYZ, BCD should be added/displayed in grid for opportunity 1 and accounts ABC, DEF, XYZ should be added/displayed in grid for opportunity 2.

Now, I am able to unlink the record with the opportunity J. Thanks!