Need help with using Crud 1.1 and jqgrid - javascript

I found this Crud 1.1 that someone put together on the CI forums and I just edited it so I could query different column names. The problem is when I try to edit a row it seems to be still using the column 'id' in the query. I can't for the life of me figure out what could be referencing that column name.
Has anyone used this template to do something similar?

This could be a stupid question but have you done a "search in files" for the value "id" in the CRUD folder structure? I'm sure its there and you just missed it..
This approach would at least track down the ID element. Keep in mind modifying this library in this fashion will cause greater headaches when/if you want to update to a never version (when it comes out that is).

Related

Dynmaic Fields - Admin on Rest

currently I'm searching for a mechanism to creat dynamic fields in the admin on rest - framework. The input-environment should look like the example in the linke below.
https://bootsnipp.com/snippets/featured/dynamic-form-fields-add-amp-remove
I want to use it to create an 1:n or m:n relation and I'm seachring for a possibility to realise it by the framewok directly or (second choise) by a react an component.
Does anybody know if there is a possbility by the Framework? I could't find anything.
Thanks
So as Base to solve my Prolem I found this discussion
https://github.com/marmelab/admin-on-rest/issues/695
I think with hind it's possible to get it

Filtering results on page with Django and Ajax

I am working on a Django project where items are displayed on the main page. I am trying to get a filter working on this page so that if I check some checkboxes it will filter the results to display on the items matching these attributes, unfortunately I do not know how to do this.
I think I need to use Ajax for this but could be wrong and was wondering how I could set up my application so that it filters the results on the page. I am using Django 1.7 and python 2.7
Edit:
Apologies for being vague with my requirements, on my sites index page I have the items listed, each items has attributes such as category that I would like to filter by. I have not written any code for this part because I don't know how to get started with this and have, unfortunately, been unable to find anything online to help. I feel that there must be an easy way to update my index page to display only items that match the boxes checked and would be grateful for help with this.
You are a bit vague in your question, but probably you are looking for something like django-filter to automate filtering of lists.
Filters are defined in a similar way as you define Forms or Models, so its easy to learn. Example
import django_filters
class ProductFilter(django_filters.FilterSet):
class Meta:
model = Product
fields = {'name': ['exact', 'icontains'],
'price': ['exact', 'gte', 'lte'],
}
No AJAX required.
But if you are using AJAX or D.R.F., there is an add-on for Django Filters, django-rest-framework-filters, so it works well via REST with the D.R.F.

XPages: How to fetch documents in view and read values?

I am a beginner with XPages, and I have looked at the TLCC Intro free training. I have also seen tutorials here. I have no experience with Lotus Notes, XPages or flat-structured databases. But, I do have some experience in JavaScript and good experience (IMO) in Java and Android.
I am facing the following problems.
1) I am trying to implement a very basic login mechanism.
Currently, I add users manually, based on a form. Now, I want to create a login page. I take a user and a password, and click on a button.
In the button, I want to read all documents associated with a view (that displays all usernames/passwords), compare with entered value, and if it exists check if the password fields match too.
Can someone please guide me in the correct direction? I can't figure out which functions to use. Also, should I be using Scope Variables? Is there a good document/tutorial regarding that?
I have tried the "view.getAllEntries()" method but it always returns null.
Am I approaching this correctly? Are there in-depth tutorials that can help me with this?
2) What is the method to debug SSJS? I am currently putting everything in a try/catch and printing the error there.
I apologize if this question has been asked elsewhere, I haven't really found anything regarding this. Please point me if there is this is a duplicate.
1.
Use view.getDocumentByKey(theUserName) to find a user document in your view. It returns the user document as NotesDocument or null if user is not in view. The view has to have a first sorted column with the usernamens.
2.
As of Notes Domino version 9 you can debug SSJS.

SugarCRM: Putting a image data type in 'Cases' module

I use SugarCRM CE. I'm trying to create an image data type on the Cases module. The purpose of this is so that the employees of my company can attach images that can better explain the cases that they submit. However, I seem to have a hard time implementing this.
I tried to follow the guide at: https://www.atcoresystems.com/blog/adding-a-photo-to-a-contact-record
This apparently does not work for me as when I navigate to the detail view and the edit view of the record, it displays a mess of code instead of the expected output.
On my own, I also tried creating a custom field trying to emulate the 'file' data type of the "Documents" module and using a javascript to display it on the Detail View but no luck at all.
I am able to display something similar to the browse file on the "Documents" Edit View but as soon as I save it, it doesn't show.
Also to include in my worries, even after I successfully use it to accept files and display them, how do I filter them to accept only image files?
Please help!!!
Finally solved this question last Friday and I thought I'd share what worked for me. I revisited https://www.atcoresystems.com/blog/adding-a-photo-to-a-contact-record and decided to give it another shot. However, on Section 4.2, I changed this:
elseif($_FILES[$this->field_name]['size']
to this:
elseif($_FILES[$field_name]['size']
I cleared the cache but mostly what really grounded me was that even after doing so, I still got the same results. So to solve this, I modified my search query and picked other random records to edit. Problem solved!

Netsuite: How to edit or update a record?

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

Categories

Resources