How to add geolocation to Service Scheduling in CRM 2011 On-Premise - c#-4.0

This is more of a general question on design approach rather than a specific programming challenge. We have a business need to schedule resources, but to reduce travel costs we need to be able to schedule resources for a customer's appointment that are geographically close. These appointments are typically in the customer's home and not at a designated site.
The process for doing the geolocation is to take the customer's location and chosen service activty, find all resources that have availability during that time frame and then rank them in order of proximity based on their previous appointment location.
That is all well and good, but the problem I have is where do I insert this logic? Would it be during the "Book" message on the Service Appointment entity through a plugin? How would this appear to the end user? Do I have to simiulate the Service Calendar functionality in a custom aspx page to accomplish this instead?
Is there a better way of doing this?

You can do this via JavaScript...
1) Create the service rep relationship to the service appointment entity. Add the service rep lookup to the service appointment entity.
2) Create a dummy text attribute and add to service appointment form
3) Fetch all of the records meeting the availability criteria you have and use either a 3rd party mapping service or based on the lng/lat distance to determine who is closest.
FetchXML - GeoCode Distance search by distance
4) Switch your dummy textbox to a select and add the options of the 10 closest service reps with their name and distance (ie. Paul Way - 1.2 miles)
5) When the new select box value is changed, populate the rep attribute on the form.
6) After testing, hide the rep attribute via javascript so that it will save the change but the user is forced to use the custom select box.

Related

Acumatica REST API - need info on API to show Account Inquiry / Customer Open Balances

Want to know the Acumatica REST API to be used to get Account Inquiry / Customer Open Balances. If no such web services then how to extend end point using which modules of acumatica erp
Not sure exactly what information yo are looking for but maybe the following screens could contain it :
Account Summary (GL401000)
Account Detail (GL404000)
Customer Summary (AR401000)
Customer Detail (AR402000)
Though only one of these screen is already mapped in the Default endpoint of version 18.200.001 (Account Summary -> AccountSummaryInquiry)
If you need information from the other screen, you will need to either create a custom endpoint or extend the default one (I recommend extending).
Here is information on how to do both:
Creating a new endpoint, it also contain information on how to add new entities in an endpoint : https://help-2019r1.acumatica.com/(W(14))/Wiki/ShowWiki.aspx?pageid=709351cc-566a-47b3-b153-3a9fdd690ce0
Extending an endpoint : https://help-2019r1.acumatica.com/(W(13))/Wiki/ShowWiki.aspx?pageid=c450492e-06fe-4563-95c3-efa76975415b
I recommend that you take a look at the way the AccountSummaryInquiry entity is defined and follow the same way to create the other screens if this is what you do. I mean by that that you put the parameter of the inquiry in the top level entity and the fields of the grid in a detail type sub entity.
And in order to retrieve the information properly I recommend that you use a PUT request instead of a GET as this is the proper way to do so as mentioned in the following article:
https://help-2019r1.acumatica.com/(W(12))/Help?ScreenId=ShowWiki&pageid=6340cff3-4732-4231-9e42-5d1e5e65b5dd

Populate CRM form fields from iframe

This is about a call center solution using Microsoft Dynamics 365 and Unified Service Desk. On the USD the call center agent needs to see information from multiple Oracle databases (3 databases for 3 products). When a call is received at the call center, the system will fetch data from these databases for the customer based on the number(telephony will be integrated using connector). We are thinking of displaying this information on an iframe in the Unified Service Desk.
Is it possible to populate CRM fields based on the what is clicked on the iframe?
Scenario: Customer calls to check about product A which he has purchased. The call center agent sees the Product A information in the iframe. When the agent clicks on the row for Product A, the Product(let this be a text field) on the Case form in the USD should be populated with the name - Product A.
Is this possible? Any ideas on how this can be implemented?
It is possible: an iFrame embedded within a CRM form can populate values on the form using:
window.parent.Xrm.Page.getAttribute("fieldschemaname").setValue(val);
For example:
productRow.addEventListener('click', function (product) {
window.parent.Xrm.Page.getAttribute("name").setValue(product.Name);
});

Hybris for B2B - Can pricing be hidden for non-registered customers?

We are looking to implement Hybris and one important feature we are looking for is to hide pricing for non-registered customers. We do want to allow them browse the catalog but we don't want them to see any pricing information. Is this a standard feature on Hybris or do we need to have it custom coded?
If you would like to hide in only jsp(storefront) you can put price tag under security tag.
<sec:authorize ifAnyGranted="ROLE_CUSTOMERGROUP">
</sec:authorize>
I can think of one way to do this.
Log into HMC and click on the Price Settings - Prices - Customer Price Lists tree node. Create a Customer Price List.
Create new user group and map the registered users to belong this user group. In Customer Prices tab of the user group, Choose Customer Prices group for registered users you just created.
Go to Catalog-> Products and the Prices tab. Create two Price Rows, one for registered Customer Price List containing product price and the other for non-registered Customer Price List containing no product price. You don't need to create a Customer Product List for non-registered users. Just keep it blank.
Make sure you sync the catalog to reflect in online version.
If you log in with the registered user and go to product detail page you could see the price and for non-registered user, it will show no price.
PS: I have not done it myself, so I'm not 100% sure if it'll work. If it does, do let me know.

How to implement Dynamic Security in PowerView

I have created a PowerView using a BISM connection in Enterprise Portal of AX. That PowerView report will be used by 100+ users. I want every user to his/her data in the PowerView instead of viewing the complete data. One option is to create 100+ security roles in SSAS (multidimentional) which is not a viable option. Please guide me how can i achieve dynamic security in PowerView so that every user sees its own view. Thanks.
Power View doesn't not offer any kind of security. You will need to do this in SSAS, but you don't need 100+ security roles. You will want to look into dynamic security. To create dynamic security, you will need some way to relate a user to the information they should see. This usually means adding a field to an existing table or creating new tables.
If all users are secured by the same attributes, they can be contained in a single role. If some users are secured based on one attribute and others based upon another attribute, then you may need multiple roles.
Here's how this might work.
Create a table that contains all users that will need access to your cube.
Create a bridge table that ties the users to the attribute on which you are securing their access. For instance, maybe users can only see certain products so you have a table of User IDs and Product IDs.
Add these tables to your DSV.
Create a user dimension.
Create a measure group based upon your security bridge table
Create a role for this user type and add an MDX statement to the Allowed Member Set. Also, set the Enable visual totals checkbox.
Populate the members for the role, preferably through an AD group rather than individually if you have 100+ users.
Your allowed member set will look something like
Exists(
{[Product].[Product ID].members},
STRTOSET("[Users].[UserName].[UserName].&[" + Username() + "]"),
"Bridge User Product"
)
You can find a good blog post here and a good video about SSAS security here (dynamic security starts around the 35 minute mark).

Dynamics CRM : Difference between Site and Sales Territory

I am creating organization architecture in dynamics CRM.
I have one question regarding - Site vs Sales Territory
or BU vs Site
When exactly we should create Site, Sales Territory or BU ?
Or we can say what are the limitations of them ?
I have gone through many forums and websites but not able to find any good document on this.
Any online book which I can read to understand this difference ?
Any help on this will be greatly appreciated.
Thank you,
Mittal.
Those are all quite different things used for different purposes. You may find you will need all three or just a couple depending on what you are trying to do. E.g. If you are not doing any sales you wont need sales territories, if you want to model a security model where only some users can see some data you will want business units.
I would suggest digging into each area in more detail (scheduling, sales, security) as described below to make that decision.
Sites are part of the scheduling engine.
In Microsoft Dynamics CRM 2011, a site entity represents a location or
branch office where an organization does business. Many Microsoft
Dynamics CRM customers have multiple sites. Sites enable resources,
services, and appointments to be defined at a particular location with
an associated time zone. Location, correct selection of resources, and
time zone are important elements in the scheduling of service
appointments when multiple locations of doing business are involved.
You can use sites to limit what resources, such as users and
equipment, can be scheduled for a specific service activity.
When you search for an available service activity resource calendar
time slot, to avoid making an appointment in the wrong location, the
scheduler must be able to select the site or delivery location as a
constraint to the search. For example, a customer may ask for an
appointment at the Seattle office. To support this, there must be a
site named Seattle and there must be required resources assigned to
the service type to be performed. When generating appointment
proposals, Microsoft Dynamics CRM 2011 must be able to avoid proposing
appointments with resources that cannot physically be together to
provide the service. The site entity serves this purpose. Sites
provide for the grouping of resources, such as users and
facility/equipment, services, and appointments, according to a
location with an associated time zone and locale.
Sales Territories are part of the sales process.
Microsoft Dynamics CRM 2011 uses the fiscal calendar entities and the
territory entity to track sales information for a salesperson. A
salesperson is a user in Microsoft Dynamics CRM who has to meet sales
objectives, such as sales quotas. A territory is a geographical area
that is assigned to a salesperson.
Business Units are part of the security model.
An organization in Microsoft Dynamics CRM, such as a holding company
or a corporation, is made up of business units. A business unit is a
unit of the top-level organization. Business units can be parents of
other business units (child business units). The first business unit
created for an organization is called the root business unit.
A business unit can own records as defined in the ownership type in
the metadata definition for an entity.

Resources