Okay so I'm trying to make a custom elgg website.
One of the main features I need is for users to be able to create events, and for those events to be displayed in a sortable table.
For events, I use a plugin for elgg called Event Manager. I originally thought that the data for the events was stored in mysql, but apparently it's stored in the elgg API instead.
'
Can anyone give me any tips on where to find the event data, and how to pull it from the api and put it into a javascript/html table?
Gracias,
Pablo Escobar
Regarding details of writing plugins, refer to documentation: http://docs.elgg.org/wiki/Main_Page and make sure to read through: http://docs.elgg.org/wiki/Engine/DataModel
To get event_calendar events, you'll need to use one of the functions from elgg_get_entities family. You'll most likely need to filter by type (object) and subtype (event_calendar), apply some filtering (metadata_name_value_pairs parameter to elgg_get_entities_from_metadata) and sorting (order_by_metadata)
For additional support you'll be more successful at community.elgg.org page.
Related
I see https://developers.google.com/maps/documentation/javascript/places-autocomplete, but don't see a way to just use their API to find those results with a custom widget. I see they have APIs without widgets, like places ("Joe's Pizza Shop"), but don't see the same for addresses which is hard to believe.
I want to use my existing autocomplete to avoid having a set of CSS for the usual autocomplete and then another set for this widget, and to avoid JSONP.
So is there no such API for addresses or am I missing something obvious?
Yes, there is an API for that: https://developers.google.com/maps/documentation/javascript/places-autocomplete#place_autocomplete_service
You can use AutocompleteService.getPlacePredictions to get the same predictions as you'd get via the Autocomplete widget, and use it to implement your own UI.
I am looking for a library for form building based on provided model, so we are looking at formly:)
I took a glance into the examples and video on formly web site, but there are still some questions without
an answer.
-There are a lot of examples of viewing/editing single entity via formly. I am interested in some example of viewing/editing collection of entities via formly (being displayed e.g. as a table). Each field of table should have it's own type.
-Editing single entity is cool. But what if editing one entity requires creation of the other entity. E.g. what if you create "User" entity, and you need to create/choose existing "Bank Account" entity to link with User? What is the best way to do such a thing?
-Are there any examples of client + server applications using formly? (e.g, we get forms from server side?). Maybe, some attributes (annotations) to classes, fields for automatic formly objects generation?
You can do all the things your talking about with formly. If you need help with something specific, follow the instructions at http://help.angular-formly.com
Good morning,
I am about to build a dashboard and I am evaluation the Freeboard product that from a first look really amaze me!
I have a couple of questions to which I could not find answers in the docs:
Is it foreseen any kind of cross-panes/widgets communication? e.g. in case i need to refresh a pane if the user interact with another. I found the freeboard.on() method but from the events' catalog I only see two events, relative to the Freeboard's instance. I couldn't find freeboard.trigger() or similar function to trigger custom event.
Is it AMD supported (RequireJS)?
Thank you very much for your time and your support.
Daniele
Git issue track
Cross widgets/panes communication is not available "out of the box" in freeboard.
There is a way to see the most current data for all datasources within any of the widgets by using the .JS Editor when connecting a widget to a datasource.
As per the help message in the editor: you can assume this .JS Editor is enclosed in a function of the form function(datasources) where datasources is a collection of objects (keyed by name) corresponding to the most current data for each datasource.
I hope this helps.
I am a newbie at NetSuite scripting. It looks like a normal EDIT or UPDATE function is not at all normal in the Netsuite. There are APIs for creating and deleting record like nlapiCreateRecord and nlapiDeleteRecord, but nowhere in the documentation I could find the way to edit and update the existing record. I have restrictions on using PHP.
I have created a custom TFC customer form (server side js), which should be able to fetch the data and update if required. I have been able to fetch the records as of now, but please tell me how to update an existing record?
To be a little more precise, use nlapiLoadRecord to fetch the record from the database. Set the fields as needed. Use nlapiSubmitRecord to save it.
Untested code off the top of my head:
var record = nlapiLoadRecord('record_type_goes_here', internal_id_of_record_goes_here);
record.setFieldValue('field_internal_id_goes_here', 'value to set goes here);
nlapiSubmitRecord(record);
Fill in the appropriate values where needed.
For the benefit of anyone looking at this question who is concerned with performance, it is much more efficient to use
nlapiSubmitField(type, id, fields, values, doSourcing)
If you know exactly what you are updating. This is both faster than submitRecord, and avoids the often significant overhead of loading the record first.
The function used to edit an existing record is nlapiSubmitRecord. See definition here http://suitecoder.appspot.com/static/api.html
I am trying to create a button on the initial list or homegrid view of leads that will set the value of a specific field to the same value every time for the lead that is selected. Anyone know how i can do this through javascript?
Thanks!
To build on James's answer, you can use the CrmParameter SelectedControlSelectedItemIds to get a list of all the leads selected in a homepage grid. There is an answer on the MSDN forums that explains how to do this, copied below. You can do this in the Xml source or in the two CRM ribbon editors I know of.
After that, you would then need to use the Update method of one of the CRM webservices to loop through the Guid array and update each entity/database row accordingly. I've mentioned Avanade's excellent web resource before, and MSDN has some additional documention on this as well.
Walkthrough: Use the SOAP Endpoint for Web Resources with JScript
Sample: Create, Retrieve, Update and Delete Using the REST Endpoint with JavaScript
<CommandDefinition Id="Account.Form.CustomGroup.Button.A.Command">
<Actions>
<JavaScriptFunction Library="$webresource:AccountFormLibrar"
FunctionName="CreateNewAccount">
<CrmParameter Value="SelectedControlSelectedItemIds"/>
</JavaScriptFunction>
</Actions>
</CommandDefinition>
function CreateNewAccount (prmRecordGUID) {
//prmRecordGUID will recieve all GUIDS in comma seperated i.e. GUID1,GUID2,GUID3
}
Yeah this should be pretty straightforward - I dont think what you have said in your comment will work - that function you are trying to use only works if the form of the record is open, e.g. it wont work from a grid view.
You will have to use a webservice call as described in the MSDN here: http://msdn.microsoft.com/en-us/library/hh771584#BKMK_DataAccessUsingJavaScript
Also if you are customising the ribbon (adding buttons) you would find it a lot easier with this tool: http://www.develop1.net/public/page/Ribbon-Workbench-for-Dynamics-CRM-2011.aspx