Copy Row Values to all Rows of one Column - javascript

My project requires a similar approach of this example: https://codecentral.devexpress.com/E2026/
Is it possible to do it without the popup and reflect the changed values on the database? And just noticed that it wasn't done using batch mode. Is this possible also on the batch mode and sqldatasource? Hope someone here can help me with this. Or any sample, idea and suggestion will do. Thank you so much.

It seems to be an older approach. Consider using the Batch Edit Mode (i.e., without a popup) instead and save data to the required storage.
Check out the following examples to see possible solutions:
(In-Memory) Batch Edit via List of Objects
(DB) Batch Edit via EntityDataSource (change it to SqlDataSource with specified CRUD commands)

Related

Is it possible to have a database under MySQL export rows into managed folders accessible to the web?

Is it possible to have a database under MySQL export rows into managed folders accessible to the web with the contents of each column be it's own text file OR json file?
To be honest, I can't find anywhere on how to do this?
My question seems to be quite niché.
Ill break down my problem.
lets say I have a database, with a table called "registry"
under registry, I would have 4 columns.
for example:
username nickname dob timestamp
bob2414 bobby 03211989 201019
sarah83 sars 10162002 231019
masterc carlo 07271997 261019
blahhbh umomi 03241999 281119
is there a way, upon a new entry, to trigger either a JS bot, or any kind of automation to create a structure on the web that could be called upon, for example.
domain.com/registry
bob2414/
nickname.txt
dob.txt
timestamp.txt
(or)
bob2414.json
sarah83/
nickname.txt
dob.txt
timestamp.txt
(or)
sarah83.json
masterc/
nickname.txt
dob.txt
timestamp.txt
(or)
masterc.json
and so on?
is there a page i can view, or any video explanation online?
Are there any better ways I can do this?
The application of my problem lies within creating these directories, as I don't want one huge json file hanging around, because i plan on these files being downloaded and accessed, and want smoother download times then managing a huge database.
The same would also apply to after I delete a row, would it manage to be deleted on its own?
please, and thank you. Ill help any way I can!
Answering my own question with a personal thought experiment.
In theory it would be easier to design an element in PHP to query the database with a GET request, and have data presented in JSON format, than to worry about managing files and directories with a java or javascript applet

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

Sharepoint - How to: dynamic Url for Note on Noteboard

I'm quite new to SharePoint (about 1 week into it actually) and I'm attempting to mirror certain functionality that my company has with other products. Currently I'm working on how to duplicate the tasking environment in Box.com. Essentially it's just an email link that goes to a webpage where users can view an image and comments related to that image side by side.
I can dynamically load the image based on url parameters using just Javascript so that part is not a problem. As far as the comments part goes I've been trying to use a Noteboard WebPart, and then my desire is to have the "Url for Note" property to change dependent on the same URL parameter. I've looked over the Javascript Object Model and Class Library on MSDN but the hierarchy seems to stop at WebPart so I'm not finding anything that will allow me to update the Url for Note property.
I've read comments saying that there's a lot of exploration involved with this so I've tried the following:
-loading the javascript files into VisualStudio to use intellisense for looking up functions and properties in the SP.js files.
-console.log() on: WebPartDefinitionCollection, WebPartDefinition, WebPart, and methods .get_objectData(), get_properties() on all the previous
-embedding script in the "Builder" on the Url for Note property (where it says "click to use Builder" - I'm still not sure what more this offers than just a bigger textbox to put in the URL path)
I'm certain I've missed something obvious here but am gaining information very slowly now that I've exhausted the usual suspects. I very much appreciate any more resources or information anyone has and am willing to accept that I may be approaching this incorrectly if someone has accomplished this before.
Normally I'd keep going through whatever info I could find but I'm currently on a trial period and start school back up again soon so I won't have as much time with it. Apologies if this seems impatient, I'm just not sure where else to look at the moment.
Did you check out the API libraries like SPServices or SharepointPlus? They could help you doing what you want...
For example with SharepointPlus you could:
Create a Sharepoint List with a "Note" column and whatever you need to record
When the user goes to the page with the image you just show a TEXTAREA input with a SAVE button
When the user hits the SAVE button it will save the Note to the related list using $SP().list("Your list").add()
And you can easily retrieve the information (to show them to the user if he goes back to the page) with $SP().list("Your list").get()
If I understood your problem, that way it may be easier for you to deal with a customized page :-)

Updating field in CRM 2011 through javascript from ribbon button on homegrid view

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

Categories

Resources