Hi Everyone,
I wanted to have effectively a table with related records to parent and for the child records to only ever be visible to the parent.
I created an entity. Added a sub grid.
Trouble is.. Add New starts a lookup. If I click Mag Glass... I get records for other parents even though I only see the related records in the sub grid view.
Posts say make related field business required to make Add New do this. But it is business required in the child entity as I reused name field
And in Contact which it is related to... I have linked to the Contact entity not any particular field
a) Please suggest better way to achieve this.
b) Advise how to hide lookup
c) Make Add New go straight to new record and have NO lookup.
CRM 2016 On-Premise
Thanks everyone
R
*This post is locked for comments
Hi Scott Durow,
Awesome that helped me a lot
i was toooooooo frustrated why the its not working .. :)
Hey All... trying to get Ribbon Workbench working so I can edit the command bar.
But I just get the following error when I try to use a solution.. new one too and even on a virgin new Org as a test.
Any help please peeps... Just did a regular on-premise install...
Server stack trace:
at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrImmutable()
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.ICommunicationObject.Open()
at Microsoft.Crm.Sandbox.SandboxClientBase`1.Open()
at Microsoft.Crm.Sandbox.SandboxClientBase`1.get_Proxy()
at Microsoft.Crm.Sandbox.SandboxCallbackService.ProcessException(Exception e, SandboxSdkClient client)
at Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Crm.Sandbox.ISandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request)
at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.RetrieveMultipleInternal(QueryBase query)
at RWB2016.Plugins.RibbonCustomisationsPlugin.GetSolutionRecord(LocalPluginContext localContext, String solutionUniqueName)
at RWB2016.Plugins.RibbonCustomisationsPlugin.GetSolutionDetails(LocalPluginContext localContext, ITracingService trace, String inputData)
at SparkleXrm.Plugins.Plugin.Execute(IServiceProvider serviceProvider)
Stack Trace:
Error:
at Xrm_Sdk_OrganizationServiceProxy$endExecute (:5555/MyOrganisationName/%7B636242554040000079%7D/WebResources/rwb_/js/ClientUI.js:4673:13)
at Anonymous function (:5555/MyOrganisationName/%7B636242554040000079%7D/WebResources/rwb_/js/ClientUI.js:19463:5)
at delegate (:5555/MyOrganisationName/%7B636242554040000079%7D/WebResources/rwb_/js/ClientUI.js:2223:13)
at xmlHttpRequest.onreadystatechange (:5555/MyOrganisationName/%7B636242554040000079%7D/WebResources/rwb_/js/ClientUI.js:4723:25)
Trace:
[RWB2016.Plugins: RWB2016.Plugins.RibbonCustomisationsPlugin]
[ac49cdfa-aeef-e611-81d5-0800278d9765: Ribbon Workbench Action]
Entered RWB2016.Plugins.RibbonCustomisationsPlugin.Execute(), Correlation Id: 3c465c94-a366-44ea-a659-74084d7275d1, Initiating User: 336f45d2-6ef0-e511-80c0-00155d00f300
RWB2016.Plugins.RibbonCustomisationsPlugin is firing for Entity: none, Message: rwb_CustomiseRibbon, Correlation Id: 3c465c94-a366-44ea-a659-74084d7275d1, Initiating User: 336f45d2-6ef0-e511-80c0-00155d00f300
Reading operation
Running method
Exception: System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
Server stack trace:
at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrImmutable()
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.ICommunicationObject.Open()
at Microsoft.Crm.Sandbox.SandboxClientBase`1.Open()
at Microsoft.Crm.Sandbox.SandboxClientBase`1.get_Proxy()
at Microsoft.Crm.Sandbox.SandboxCallbackService.ProcessException(Exception e, SandboxSdkClient client)
at Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Crm.Sandbox.ISandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request)
at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.RetrieveMultipleInternal(QueryBase query)
at RWB2016.Plugins.RibbonCustomisationsPlugin.GetSolutionRecord(LocalPluginContext localContext, String solutionUniqueName)
at RWB2016.Plugins.RibbonCustomisationsPlugin.GetSolutionDetails(LocalPluginContext localContext, ITracingService trace, String inputData)
at SparkleXrm.Plugins.Plugin.Execute(IServiceProvider serviceProvider), Correlation Id: 3c465c94-a366-44ea-a659-74084d7275d1, Initiating User: 336f45d2-6ef0-e511-80c0-00155d00f300
Exiting RWB2016.Plugins.RibbonCustomisationsPlugin.Execute(), Correlation Id: 3c465c94-a366-44ea-a659-74084d7275d1, Initiating User: 336f45d2-6ef0-e511-80c0-00155d00f300
I think Ribbon workbench is the best option.
As I cannot do what other posts are suggesting.
But unfortunately it errors when I try to use it... The software writer did send one message. But nothing more...
So I am stuck again.
R
Hi
What Nadeeja said is correct. N:N lookup only existing button will display if you still want then add custom code to open the entity record in the + button in the subgrid using ribbon work bench
msdn.microsoft.com/.../jj602956.aspx
or
Create the button in the html webresource and open the entity
Hi Alagu,
If you create a lookup it becomes a 1:N relationship. You can create a N:N relationship directly. Please see below.
Hi Romolo,
The parent lookup in child entity mandatory rule doesn't apply for N:N relationships.
community.dynamics.com/.../availability-of-add-new-and-add-existing-buttons-in-sub-grids
without creating lookup how do you have many to many realtionship
Refer this:
https://garethtuckercrm.com/2013/11/19/fixing-the-sub-grid-user-experience-in-crm-2013/
https://sliong.wordpress.com/2012/06/14/crm-2011-hide-add-new-button-on-subgrid-tab-using-formentitycontextrule/
Sorry everyone. I was replying by email but that does not seem to populate a response
I do not have a 'Contact' field within the child entity.
Renamed Name field on child entity and added a Date field
Can you guys be more specific as I might be doing 2+2 = 5 :)
Thanks
R
Hi
In your child entity make parent entity lookup field as mandatory
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156