We need to create a key for the "incident" entity and the field we would like to use for it is "ticketnumber". The problem we have is that the field is not selectable for this key, does anyone ane idea about what can happen?
Thanks so much!!!
Trying to run CRM2016-Srs-KB3154952-ENU-Amd64.exe on our SQL Server I get the alert 'Microsoft Dynamics CRM Reporting Extensions is not installed on this computer.'
However the Reporting Extensions are definitely installed. (version 7.0.0000.3543)
Any ideas?
jquery script is:
<script>
$(document).ready(function () {
$("#LeadForm").submit(function (event) {
$.ajax({
type: "POST",
url: "http://localhost:9135/api/CRMLead",
data: $("#LeadForm").serialize(),
dataType: 'json',
success: function (response) {
alert(response);
$('#LeadForm').each(function () {
this.reset(); //Reset each field
});
},
error: function (request, textStatus, errorThrown) {
alert(request.responseText + " " +
textStatus + " " + errorThrown);
}
});
event.preventDefault();
});
});
</script>
controller is:
public class CRMLeadController : ApiController
{
private OrganizationService _orgService;
[EnableCors(origins: "*", headers: "*", methods: "post")]
public string Post([FromBody] FormDataCollection formValues)
{
string domain = HttpContext.Current.Request.Headers["Origin"].ToLower();
string host = HttpContext.Current.Request.Url.Host.ToLower();
//if (!domain.Contains("yourdomain.com") && !domain.Contains(host))
// return "fail!";
CrmConnection connection = CrmConnection.Parse(
ConfigurationManager.ConnectionStrings["CRMOL"].ConnectionString);
using (_orgService = new OrganizationService(connection))
{
Entity lead = new Entity("lead");
lead["firstname"] = formValues.Get("FirstName");
lead["lastname"] = formValues.Get("LastName");
_orgService.Create(lead);
}
return "success";
}
}
}
CRM Connection is:
<add name="CRMOL" connectionString="AuthType=Office365; Username=xxxx@xxxxxx.onmicrosoft.com; Password=xxxx; Url=https://xxxxx.crm.dynamics.com "/>
Thanks in advance
Hello,
I am having trouble with the AcquireTokenByAuthorizationCode.
If using the method AcquireTokenByAuthorizationCode, I get this error:
'Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext' does not contain a definition for 'AcquireTokenByAuthorizationCode' and no extension method 'AcquireTokenByAuthorizationCode' accepting a first argument of type 'Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext' could be found (are you missing a using directive or an assembly reference?)
If I will use the available method AcquireTokenByAuthorizationCodeAsync, I get this error:
Cannot implicitly convert type 'System.Threading.Tasks.Task<Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult>' to 'Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult'
Below are the codes I am using:
var queryString = Request.QueryString;
string authCode = queryString["code"];
TokenCache tokenCache = new TokenCache();
AuthenticationContext authContext = new AuthenticationContext(string.Format(AuthorityUri, _configuration.ADTenant), tokenCache);
ClientCredential clientCredentials = new ClientCredential(_configuration.ClientId, _configuration.ClientSecret);
AuthenticationResult authResult = authContext.AcquireTokenByAuthorizationCode(authCode, new Uri(_configuration.RedirectUri), clientCredentials);
Hi, anyone have any experience of using this message with attachments please?
I have successfully created [Received] messages and added attachments afterwards, however I've seen that inline attachments need the email body to be modified to replace the src=cid: to linkages to attachments in CRM.
Yet I can't create the attachments first and pass them into the DeliverIncomingRequest as a need an objectid to create them :-(
Any insight would be appreciated, Thanks
I have 3 fields in the Opportunities entity to lookup account names from the Accounts entity. Sometimes the entry is the same company, sometimes different. So I have the following fields:
"End User", "Bill to Company", "Agent".
But, when I'm in any Account entity, and select the submenu for that account, I'm seeing 3 Opportunity submenus under the Common section and another one in the Sales section.
Not being a DB wizard, but smart enough to figure things out, I'm sure it has something to do with the relationship. between the 3 fields and the account entity.
Any ideas how to solve this without removing the three fields?
I am trying to use Linq query to get the Opportunity data and its Parentaccountid Account Fields and its ParentCotnactId contact Full Name in one Linq query.
Most of the time Opportunity may have account associated with that but it may not have parentcontactid associated with that. So i need to do left outer join but for some reason it didn't work.
can any one assist on this??
- Dim oppties = From opt In context.OpportunitySet
- From act In context.AccountSet.Where(Function(A) A.AccountId = opt.ParentAccountId.Id).DefaultIfEmpty()
- From cnt In context.ContactSet.Where(Function(C) C.ContactId = opt.ParentContactId.Id).DefaultIfEmpty()
- Where opt.ParentAccountId.Equals(accId)
- Select New OpportunityInfo With {.OpportunityId = opt.OpportunityId.Value.ToString("B"),
- .ParentAccountId = opt.ParentAccountId.Id,
- .ParentAccountName = act.Name,
- .ParentAccountNumber = act.AccountNumber,
- .ProductGroup = opt.productgroup.Value,
- .MktSegment = act.DIVTeam,
- .EstRevenue = opt.ssco_EstimatedRevenue,
- .Topic = opt.Name,
- .CreatedOn = opt.CreatedOn,
- .Contact = If(cnt Is Nothing, String.Empty, cnt.FullName)}
- Dim oppties = (From opt In context.OpportunitySet Group Join
- act In context.AccountSet On opt.ParentAccountId.Id Equals act.AccountId
- Into gr = Group From act In gr.DefaultIfEmpty() Group Join
- cnt In context.ContactSet On opt.ParentContactId.Id Equals cnt.ContactId
- Into ct = Group From cnt In ct.DefaultIfEmpty()
- Where opt.ParentAccountId.Equals(accId)
- Select New OpportunityInfo With {.OpportunityId = opt.OpportunityId.Value.ToString("B"),
- .Topic = If(opt.Name Is Nothing, String.Empty, opt.Name),
- .MktSegment = If(act.DIVTeam Is Nothing, String.Empty, act.DIVTeam),
- .EstRevenue = opt.EstimatedRevenue,
- .CreatedOn = If(opt.CreatedOn Is Nothing, Nothing, opt.CreatedOn),
- .ProductGroup = opt.productgroup.Value,
- .Contact = If(cnt.FullName Is Nothing, String.Empty, cnt.FullName),
- .ParentAccountId = opt.ParentAccountId.Id,
- .ParentAccountName = If(act.Name Is Nothing, String.Empty, act.Name),
- .ParentAccountNumber = act.AccountNumber
- })
Hello Devs,
Help please.
I am just trying to explore configuration settings for Microsoft Azure (SAS) for integration with Dynamics CRM following this Walkthrough: Configure Microsoft Azure (SAS) for integration with Dynamics CRM.
"This feature was introduced in CRM Online 2016 Update 1 and CRM 2016 Service Pack 1 (on-premises).. You must use the Plug-in Registration Tool from the v8.1 or later release of the CRM SDK.Download the Microsoft Dynamics CRM SDK package."
Using the specified Plugin Registration Tool from the latest CRM SDK, I created new connection to my newly (just today) created CRM trial. Now, when I click "Register" and then "Register New Service Endpoint" this opens Service Endpoint
Registration dialog that doesn't reflect as described in the walkthrough. It just opens up the dialog similar to the older version of Plugin Registration
The steps (and images) identified in the walkthrough reflect that clicking the "Register New Service Endpoint" should first ask for connection string. And then the next Service Endpoint Registration dialog als contain few additional inputs like Message Format and Authorization Type.
Note: I haven't setup an Azure account and configured Service Bus messaging entity for SAS yet. I am just trying to explore at the moment. That I believe should not be an issue as I have not provided the Azure creds to the CRM at this stage.
blog: <a href="http://technologynotesforyou.wordpress.com">http://technologynotesforyou.wordpress.com</a> | skype: ali.net.pk
Hi,
I am trying to register my application with Azure so that I can use webapi for my application, but there is a issue.
I am following below mentioned steps
But coming to 10th point , I am unable to find Dynamic CRM Online in list of application.
Can any one help me please?
Regards
Prashanth
Thanks Regards Prashanth Kamasamudram Even the least work done for others awakens the power within; even thinking the least good of others gradually instills into the heart the strength of a lion.
Hello,
I am trying to delete a custom button created by ribbonworkbench. I have an issue every time when i make change and try to publish. i receive an error.
How can i do that?
Thanks by advance
Regards
Hi,
I am having Server Side Sync, enabled for Queue. SSS works fine as long as it is receiving emails from .com domains. However it is giving following error while processing email that is sent from comcast.net domain. Emails are not getting created as Activities in CRM
There is no Custom Plug-in or Workflow running on email entity in CRM. There are no 2 queues with same email address.
>Crm Exception: Message: Bad Conversation Index, ErrorCode: -2147220970 [2016-03-28 15:14:31.542] Process:CrmAsyncService |Organization:f81b30cf-7cd2-e111-b664-005056ab021d |Thread: 74 |Category: Platform.Sdk |User: 46e15091-f11b-412d-b003-124b24a4fbf5 |Level: Error |ReqId: 00000000-0000-0000-0000-000000000000 | VersionedPluginProxyStepBase.Execute ilOffset = 0x65 at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65 at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action) ilOffset = 0x2D at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0xD8 at <>c__DisplayClass1.<RunStage>b__0() ilOffset = 0x0 at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action) ilOffset = 0x2D at MessageProcessor.RunStage(PipelineExecutionContext context, Int32 pipelineStage) ilOffset = 0x39 at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x171 at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4 at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x1EE at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26 at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34 at IncomingEmailProviderBase.DeliverMessageInternal(EmailMessage emailMessage, Boolean validateBeforeCreate) ilOffset = 0x207 at IncomingEmailProviderBase.DeliverMessage(EmailMessage emailMessage, Boolean validateBeforeCreate) ilOffset = 0x19 at GetItemsStep.ProcessResponse() ilOffset = 0x5AB at ExchangeIncomingEmailProviderStep.EndOperation() ilOffset = 0xFC at ExchangeIncomingEmailProvider.ReceiveEmails() ilOffset = 0x92 at IncomingActivityProviderBase.Run() ilOffset = 0x42 at MailboxEmailOperation.PerformOperation() ilOffset = 0x2C at MailboxOperationBase`1.Execute() ilOffset = 0xAA at MailboxProcessingOperation.PerformOperation() ilOffset = 0x1A at MailboxOperationBase`1.Execute() ilOffset = 0xAA at MailboxOperationCommand.InternalExecute(MailboxAsyncEvent asyncEvent) ilOffset = 0x64 at AsyncCallbackHandler`2.ResumeExecution(IAsyncEvent asyncEvent) ilOffset = 0x5B at AsyncEventExecutionManager`2.ExecuteHandler(IAsyncEventHandlerFactory handlerFactory) ilOffset = 0xD9 at PoolHandler.ProcessAsyncEvent(IAsyncEventExecutionManager asyncEventExecutionManager) ilOffset = 0x144 at AsyncEventOperation.<.ctor>b__2(IServiceOperation operation) ilOffset = 0x0 at FaultToleranceBehavior.Execute(ServiceOperationAction operation, IServiceOperation operationParameter) ilOffset = 0x18 at MonitoredOperation.Execute() ilOffset = 0xD at ThreadPoolQueueExecutionEngine.InvokeNextOperationInThreadPool(Object state) ilOffset = 0xC at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) ilOffset = 0x70 at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) ilOffset = 0x4 at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() ilOffset = 0x0 at ThreadPoolWorkQueue.Dispatch() ilOffset = 0xA3>Web Service Plug-in failed in SdkMessageProcessingStepId: {D0CABB1B-EA3E-DB11-86A7-000A3A5473E8}; EntityName: email; Stage: 30; MessageName: DeliverIncoming; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values) at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider) at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) Inner Exception: Microsoft.Crm.CrmException: Bad Conversation Index at Microsoft.Crm.CrmException.Assert(Boolean condition, String message) at Microsoft.Crm.Common.ObjectModel.EmailService.AddAdditionalFields(Email email, Entity emailDeltaEntity, ExecutionContext context) at Microsoft.Crm.Common.ObjectModel.EmailService.SetRecipientsAddAdditionalAttributeAndCreate(AddressEntry[][] allResolvedAddressEntries, Email email, Entity emailDeltaEntity, String traceSubject, ExecutionContext context) at Microsoft.Crm.Common.ObjectModel.EmailService.Deliver(Boolean userPromote, Guid emailId, String messageId, String subject, String from, String to, String cc, String bcc, DateTime receivedOn, String submittedBy, String importance, String body, BusinessEntityCollection attachments, Guid campaignResponseId, Entity emailDeltaEntity, ExecutionContext context, Boolean validateBeforeDeliver) at Microsoft.Crm.Common.ObjectModel.EmailService.DeliverIncoming(String messageId, String subject, String from, String to, String cc, String bcc, DateTime receivedOn, String submittedBy, String importance, String body, BusinessEntityCollection attachments, Entity extraProperties, Boolean validateBeforeCreate, ExecutionContext context) .
MaKeer | myencounterwithcrm.wordpress.com |CRM2011 User Settings Utility |CRM2011 Lookup Preview |CRM2011 Lookup Attribute Mapping |CRM2011 TreeView Control (Beta) |CRM2011 N:N Entity View (Beta) |CRM 2011 Global Quick Search (Beta)
Can you create a stored procedure in CRM Online?
I need to create field one product inventory records when a new product or warehouse is created.
CRM2016
I have a custom entity new_Headers which has a lookup to a custom entity new_originatingaccounts
The lookup field on new_headers is new_oaccountid
I an trying to retrieve the value from new_originatingaccounts for the field new_sun
my code below is not returning any record although I know the record exists
Try ' Need to Lookup SUN Dim strSUN As String = String.Empty If entity.Contains("new_oaccountid") Then Dim serviceFactory As IOrganizationServiceFactory = DirectCast(serviceProvider.GetService(GetType(IOrganizationServiceFactory)), IOrganizationServiceFactory) Dim service As IOrganizationService = Nothing service = serviceFactory.CreateOrganizationService(context.UserId) Dim req As New RetrieveRequest() req.ColumnSet = New ColumnSet(New String() {"new_sun"}) req.Target = New EntityReference("new_originatingaccounts", DirectCast(entity.Attributes("new_originatingaccountsId"), EntityReference).Id) Dim resp As RetrieveResponse resp = service.Execute(req) strSUN = DirectCast(resp.Entity.Attributes("new_sun"), String) End If Catch ex As Exception Throw New InvalidPluginExecutionException("Error looking up SUN - " & ex.Message.ToString) End Try
Dont ask me .. i dont know
I have created two fields.1.textcountry,2.lookupcountry on account.
when textcountry value changed ,I need to set textcountry val to lookupcountry .How can I set?
Hi,
sometime, I face the issue while accessing Interactive Servicce Hub - On premise instance 2016 (sometimes).
My requirement is like, if Case is gets resolved, then I need to create an KB article and it should be in Draft status and having case information on KB article. but when the KB article is created when case is resolved ( I wrote a code for this) then I am not able to directly modify the KB article (as it comes in ready only state) . I need to go Interactive service hub then can modify the KB article.
Thanks is advance!
CRM 20216
Within my plugin I need to pass a date from the triggered entity and check if the date is in the closed business days or is a weekend day ( ie Saturday or Sunday)
ie if the date passed is a Saturday or a Sunday or is a closed business day return a false ( not a valid working date ) .
I have tried looking at some of the coding available, but it doesn't seem to work on crm2016
Dont ask me .. i dont know
I wrote jvascript function for PreFilterLookup .It is support for manin form .But it doesn't support mobile form.
Please find below code.Any suggestions??
function FilterLookup () {
try {
var Frmtype = Xrm.Page.ui.getFormType();
var lookupObject = Xrm.Page.getAttribute('to');
if (Frmtype == 1 && lookupObject != null) {
Xrm.Page.getAttribute('to').setValue(null);
}
var lookupData = Xrm.Page.getAttribute('to').getLookupDataAttribute();
if (lookupData.getSupportedLookupTypes().length > 1 && lookupData.getSingleLookupTypeId() !== 2) {
lookupData.setLookupTypes(['contact']);
}
}
catch (e) {
alert('An error has occurred: ' + e.message);
}
}
Hi Experts,
I am getting the below exception while connecting to the MS CRM 2013 Discovery Service through the plug-in registration tool.
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. atMicrosoft.Xrm.Tooling.CrmConnectControl.CrmServerLoginControl.StartConnectCheck() at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.Controls.Button.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Window.ShowHelper(Object booleanBox) at System.Windows.Window.ShowDialog() at Microsoft.Crm.Tools.PluginRegistration.MainViewModel.CreateConnections().
It would be great if anyone can help on this.
Thanks
Srikanth
Hi Everyone,
I am trying to investigate a strange error occurring on CRM 2016 on-premise. Sometimes the site crashes unexpectedly. Well it happens with applications, so this is not my main problem. The problem is that after I am trying to refresh the page, it fails to load again. Only a blue stripe is visible on top which is supposed to be the menu, and everything else is blank. Furthermore, the same thing happens for all organizations on the same server. I receive the following script errors on the console:
InvalidCharacterError
File: global.ashx, Line: 28086, Column: 601517
Unable to get property 'getServiceDirectory' of undefined or null reference
File: global.ashx, Line: 27304, Column: 5
Currently the only working solution to recover is to restart the computer, but I would like to find out what exactly goes wrong. Any ideas?
The server is upgraded from a 2011 instance, I am not sure if it has anything to do with the issue.
Regards,
Adam
I am developing a plugin for a CRM 2016 On Premise implementation.
The max file size setting has been set to 30,000 KB in Administration -> system settings -> Email tab.
I have a plugin which runs asynchronously on post create of notes.
The plugin checks if the note has an attachment and if the attachment is present, it gets the attachment and uploads it to sharepoint.
I have been able to load notes with attachments of up to 16 MB successfully through the plugin.
However, when I create a note with an attachment of size 20 MB, I async plugin fails with the following error:
Bad Data: Plugin data is corrupted or too large.
I read the attribute into a byte array using the ConvertToBase64 message on the documentbody attribute of the note.
Can anyone help me with the issue or suggest some approaches I can try out to troubleshoot and solve this problem?