As in the title. GET /node/1 returns article details with field called "comment" - but there are comment settings. GET /comment/1 returns comment with id 1 details. So how can I get article with comments list? Or just comments list for specific article?
Create a new View with the following settings:
Provide a REST export, and add a path.
Make sure that Format is set to Serializer and Accepted request format is set to json
Add a filter for Content: Type (= [your format])
Add in Fields a field for Content: Comments
Related
I am trying to get a field with a rich text but it is striping all the html in the search query. Is there a way to get the html rather than the rich text?
https://{domain}.sharepoint.com/_api/search/query?querytext=%27claim%27&selectproperties=%27Title,Question,Answer%27
<d:Key>Answer</d:Key>
<d:Value xml:space="preserve"> See THIS Form . </d:Value>
Answer is the Rich text field with a link in it, When I do a GET (_api/web/lists/getbytitle), it comes back with a link in that field.
Basically, I want to avoid having to call search then call a GET to replace the values.
I solved this by looking through the search properties and using the ID in the path to use a GET List
_api/web/lists/getbytitle('title')/items('1')
then replacing the column in search with the rich text with the one from the GET.
I only need 3 results or so, so this was not a problem for me.
It looks like in the search query, doesnt give back any html tags for the rich text column.
Say I have a database record with 7 fields and I just want to edit the contents of field 1. So I hit my GET EDIT action, it renders the strongly typed view with my viewmodel and I go ahead and update field 1. However, my POST action contains 'mapping' for all fields as below. So will entity framework 'overwrite' all 6 other fields in the underlying database with the unchanged value or will it only just change field 1?
Just looking for further clarification after giving the previous related answer (c# edit method overwrite all or only save changes fields?) some more thought given that I am explicitly specifying each field in the edit method.
EDIT POST method extract -
db.entities.find(x)
entity.field1= viewmodel.field1;
entity.field2= viewmodel.field2;
entity.field3= viewmodel.field3;
entity.field4= viewmodel.field4;
entity.field5= viewmodel.field5;
entity.field6= viewmodel.field6;
entity.field7= viewmodel.field7;
db.savechanges()
FYI - this is my first proper MVC app.
Many thanks
I'd like to implement a tag system to a SugarCRM that has the following characteristics:
User can create any new tag just by writing the new tag into the tag field
Existing tags are suggested for user to choose, in order to avoid having similar tags (e.g. if user tried to enter "sugar" as tag, it should be suggested for them to choose "SugarCRM")
Search by tag should result only records that have that tag, but not records that have that tag as a keyword in title or description fields
All record in all modules should have a tag field
It would be nice if a search by tag could be made throughout all modules
Does anyone know if there is already some implementation for this?
There are several on SugarForge. I've used SugarTAGS from CARRENET (http://www.sugarforge.org/projects/sugartags/) as a starting point before.
I have a custom object known as "Companies".I have created a lookup field in a Visual Force page which gives me the list of companies name from the custom object " Companies".I have written a code which makes this lookup field auto-complete like what you have seen in the image attached.(First pic)
The problem: I don't know how to make the lookup field (which takes the list of companies name from custom object" Companies" in "Opportunities" standard object) auto-complete as done in the visual force page. Basically want the field highlighted in yellow in the second picture to auto-complete or give relevant suggestion when I type the first few characters.
Any help on this matter would be appreciated. Thank you
Have you tied enabling Auto Complete for your custom object the search page?
Click Your Name | Setup | Customize | Search | Search Settings.
Check the Lookup Auto-completion check box for your object.
This will give you auto-complete options for recently used items.
http://help.salesforce.com/help/doc/en/search_lookupdialog.htm#auto_complete
You will not be able to embed this customization into a standard page layout like you're using for the Opportunity object in your second screenshot. If that auto-complete is a must-have, then you really only have two options:
Replace the entire Opportunity page layout with a custom VF page
Write a VF component with just the Company lookup field in it and embed it into your Opportunity page layout (this will have to be in its own section, which probably won't look as nice)
This is what you want - http://tapp.ly/autocomplete/
Autocomplete Lookups for Salesforce enables any Salesforce Lookup field to support autocomplete suggestions. Autocomplete Lookups helps your users enter lookup fields reducing data entry tasks and error rates.
Salesforce records suggested as you start typing
Search All fields (Standard Salesforce Lookups only let you search by the Name field)
Results can show any field (E.g. Case Subject rather than Case Number)
This is either very annoying or very embarrassing. I've set up most of my blog, but I can't figure out where or how the heck I set up single entry templates as opposed to the section/weblog containing them. I just can't find information on how to do it for the life of me.
This is especially important, because I want to define the canonical link for all entries, since ExpressionEngine links to entries in all kinds of ways.
So, the case is that I have a Blog section/weblog with an index working as the front page for mydomain.com. This lists all my entries as you would imagine a regular blog to do. The problem arises when I need to customize the code for the single entries' links.
If you have a template set up already which is showing a multitude of entries and you want a single entry page for each entry then what you need to do is this :
{exp:channel:entries
channel="default_site"
sort="asc"
disable="member_data|pagination|categories"}
{title}
{/exp:channel:entries}
Then in the template shown above by template_group/template_name (please change those to whatever your template group and template names actually are ;-) ) you will place this code :
{exp:channel:entries
channel="default_site"
limit="1"
dynamic="yes"
sort="asc"
disable="member_data|pagination|categories"}
{title}
{/exp:channel:entries}
This will then show you just the one entry as you will have used the {url_title_path="template_group/template_name"} in the first channel entries tag above which would basically create a URI something like this :
http://www.example.com/template_group/template_name/url_title_of_my_posted_entry
On the second (template_group/template_name) single entry template page it will see the URL title and use this to filter down the channel entries tag to just that one entry.
Hope that helps a bit.
Best wishes,