Imagine I we have the Person class which have a navigation property named Skills and I want to access Skills of each person in the report.
But the code
report.RegBusinessObject("Persons", ctx.PersonCollection)
just registers value typed properties of each Person in the report and I have to iterate each Person to get its related Skills and register its Skills separately.
Any suggestions?
Try to call report.Dictionary.SynchronizeBusinessObjects(2) after registering BO.
Related
I am showing certain notebook/page according to user groups in Odoo11 form.
As per my architecture i am unable to use access record rule as per groups for all employee but as an alternative i made all fields invisible employee form(except employee name) for other employee and user can see full information for his/her record only. But now i can see security issue with inspect element(developer tool) where users able to see other employee information by removing class(.o_invisible_modifier) from developer tool. So, how i can secure my system by removing this issue?
Note: I am already block keyboard short-cuts and events for inspect element by J query.
Please suggest me best solution.
Thanks in advance.
For same reason Employee model is changed starting form Odoo 13.
Now its split between 2 models. Where personal info is present on one model and public info is on the other model.
But you can maybe do extra manual check. When you overwrite write and i think it was read.
https://github.com/odoo/odoo/blob/5b335396addb16456d61273ae6b0446913f7f489/addons/project/models/project.py#L1607
https://github.com/odoo/odoo/blob/5b335396addb16456d61273ae6b0446913f7f489/addons/project/models/project.py#L1625
In CRM 2011, using JavaScript, how can I get the calling entity or form type name? For example, if I open an activity, I want to see if I opened this activity from an account form or a contact form etc. I have googled this and I am not finding anything.
In that particular case you should check the regarding field - CRM automatically populates this, that should contain the information you require.
Use
window.parent.opener.Xrm.Page.data.entity.getEntityName()
This will only work if you have opened up the entity from the calling entities' form.
It will not work if you open up the entity from the related activities section by on the left.
Basically the parent page should have the entity form loaded in order to use the Xrm.Page.data object.
I have a custom entity Partnership in which I have one lookup field contacts.
now I want to add the name field value of the partnership from contact fullname in time of creation of Partnership.
is it possible with the help of pre-existing configuration settings,(without plugin or web resource)
Thanks.
Without using a plug-in or web resource you have a couple options.
1- You can configure the mappings between the 2 entities by going to the Entity (contact) -> Relationship -> Mappings -> and add a new mapping there. For this to work though, you will need to create the child record from the subgrid of the contact, and if the contact changes it won't update the values. So it may or may not be an ideal solution for you.
2- You can create a workflow rule that runs on create and/or update of the Partnership record that pulls the value from the parent contact onto the partnership record. The downside of this is that workflows are async so you won't see the update for a few seconds and refresh the Partner record.
Hope this helps.
If you want to be able to click the "New Partnership" button in the CRM ribbon, then select a contact, and have the name of the contact, be used to populate another field on the form, you will have to use JavaScript. There is no configurable way of doing it.
If you'd like the value to be populated before it is saved in the CRM database, you could use JavaScript, or a custom Plugin. If you'd like the value to be updated after the record is created, you could use a workflow.
You'll have to use one of those three methods to populate the field. The real question I have though, is why are you bothering to populate the field in the first place? You can add the full Contact name to any view, so I don't see a real big reason to include it.
I use a custom UITableView to display some data together with the contacts out of the users address book. I won't to invoke the standard, non-editing, view of a single contact when one this entries is tapped. How do I do that? I mean I know how to figure out wether a contact or one of my custom entries was tapped but how can I invoke this view?
Thanks.
Philip
I'm not quite sure what the exact problem is that you have because it lacks detailed information.
But perhaps all you want is to push a ABPersonViewController instance initialized with the selected person on your navigation controller.
We use Sharepoint Services 3.0 as a project tracking tool. We have a list set up that contains your basic information (description, etc.) plus we have a "assigned person" column that is of type Person or Group that we use to associate list items with individuals. This column supports multiple selections.
We would like to set up alerts such that each person gets an alert email only if they are assigned to a list item. The approach we have taken is to set up a view on this list that is filtered to show list items where the assigned person equals [Me], and then to create an alert on this list that is set to send an email when someone changes an items that appears in the view.
This works well when there is only one person in the assigned person column. It does not work when there is more than one person in the assigned person column.
Does anybody know why this wouldn't work, or what I can do to troubleshoot? Is there a better way to achieve the end result? We could make several "assigned person" columns and not allow multiple selections, but that seems kind of kludgy.
Try this info site,
http://www.sharepointalert.info
it has a good alert trouble shooting guide.
The reason it works for one person but not multiple people is because the check is specifically against an individual. The comparison your view does is whether Assigned is equal to [Me], not if Assigned has [Me] as one of its entities.
Instead of using a list filter of is equal to, use the list filter contains. That should do the trick.
EDIT IN RESPONSE TO COMMENTS
To access the object model, you'll need to use Visual Studio. I'm unaware of a method to accomplish this kind of thing using SharePoint Designer, but maybe there's some sort of crazy Datasheet View thing you can do. Anyway... onto your actual needs...
The following code sample illustrates a very basic method for achieving your goal.
using (SPSite site = new SPSite("yourwebsiteurlhere"))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["titleoflist"];
SPView view = list.Views["filteredviewname"];
view.Query = "<Where><Contains><FieldRef Name=\"assignfield\"/><Value Type=\"Integer\"><UserID Type=\"Integer\" /></Value></Contains></Where>";
view.Update();
}
}
Replace "yourwebsiteurlhere" with the website url, "titleoflist" with the title of your list in question, "filteredviewname" with the name of the view, and "assignfield" with the internal name that you used for your assignment field. If you created it through the standard SharePoint UI, this should be the name of the field without any spaces.
As far as where to run the code, you could put this kind of thing in a one-time workflow. I sometimes do that just to make sure I have necessary privileges. Hope this helps!
If you're not able to/allowed to use Visual Studio, then your solution will probably have to be to look into a 3rd party solution.