MKS Integrity: open item from command line - mks

I would like to open a item in MKS from the command line using the item number:
command 123456
and get directly to the gui item view. I've been googling around for API examples, but haven't found anything helpful yet. In the extension I'll use it to make a shortcut from my text editor.
Hope this is possible, any ideas?

im viewissue is the cli command for "View Item".
In your case, the command should be like this:
im viewissue --hostname=%mks_host% --port=%mks_im_port% --user=%mks_user% --gui %item_id%
where %mks_host%, %mks_im_port%, %mks_user% and %item_id% should be replaced with the proper values.
im viewissue command usage
Usage: im viewissue options... item id...; options are:
--asOf=[<date>|label:<label>] View the item(s) as of a historical date or label
--height=value The height in pixels of the windows
--[no]showAnnotations Display annotations
--[no]showAttachmentDetails Display all attachment attributes
--[no]showAttachments Display attachments
--[no]showBranches Display branches
--[no]showChangePackages Display change packages
--[no]showDecorators Display "!" for ambiguous field values
--[no]showHistory Display history
--[no]showHistoryAscending Display history in chronological order
--[no]showHistoryWithComputedField Display history with computed fields
--[no]showHistoryWithIndirectEdits Display history with indirect edits (CLI/API only)
--[no]showLabels Display labels
--[no]showLock Display lock information
--[no]showRelationships Display relationships
--[no]showRichContent Display rich text field data as rich content
--[no]showSourceLinkDetails Display all source link and source trace attributes
--[no]showSourceTraceDetails Display all source link and source trace attributes
--[no]showTestResults Display test results
--[no]showTimeEntries Display time entries
--[no]showWorkflow Display workflow
--[no]showXHTML Display rich text field data as XHTML
--[no]substituteParams Substitute parameters
--width=value The width in pixels of the windows
-x value The x location in pixels of the window
-y value The y location in pixels of the window
-? Shows the usage for a command
--[no]batch Control batch mode (no user interaction in batch mode)
--cwd=value Act as if command executed in specified directory
-F value Read the selection from a specified file
--forceConfirm=[yes|no] Specify an answer to all confirmation questions
-g User interaction should happen via the GUI
--gui User interaction should happen via the GUI
--hostname=value Hostname of server
-N Responds to all confirmations with "no"
--no Responds to all confirmations with "no"
--password=value Credentials (e.g., password) to login with
--port=value TCP/IP port number of server
--quiet Control status display
--selectionFile=value Read the selection from a specified file
--settingsUI=[gui|default] Control UI for command options
--status=[none|gui|default] Control status display
--usage Shows the usage for a command
--user=value Username to login to server with
-Y Responds to all confirmations with "yes"
--yes Responds to all confirmations with "yes"

Although there does not seem to be a standard API command to bring you to an item in the Web GUI from the CLI, there is a standard URL you can construct to view any given item directly from a web browser.
The URL to access an item directly by it's item ID via a web browser will be:
%host_server%:%port%/im/viewissue?selection=%item_id%
where:
%host_server% is the full URL address of the server hosting the Integrity application.
%port% is the port number of the Integrity application on the host server.
%item_id% is the integer item ID to view.
Example: If my Integrity application is available on the server https://myhostserver.com at port 1234 and the Item ID I want to view is 123456, then the URL to construct is:
https://myhostserver.com:1234/im/viewissue?selection=123456
This link can then be dynamically created to access any existing Integrity item ID. Users will still be required to authenticate within Integrity before the item can be viewed.

Related

How can i upload/use my client script in suitescript NetSuite

Can somebody explain to my how can i use or upload my client script in suitescript creating a form in netsuite? Appreciate the help. Thank you.
Your question is not clear. You want to upload a client script that would create a form?
First, do you want to upload javascript/suitescript file? if yes then you should follow what Jo O posted earlier.
Second, you mean your client script will create form? I don't think it is possible because only suitelet can create a form.
Third, you mean to say that you want a client script attached to a form? If yes there are two ways to do it, First you can customize your form and put your client script on the Custom Code tab. Second is to create a client script record and do not deploy it to any record take note of the script ID and you can use the setScript method to set/attach the script on the nlobjForm object on before record load of user event script or on the suitelet.
This is from SuiteAnswers # 23388.
Assuming you're using the Eclipse IDE with the SuiteScript Add-in, first make sure that you have your NetSuite accounts setup in the IDE:
1.In SuiteCloud IDE, set your master password by going to NetSuite > Master Password > Set Master Password.
2.Add your NetSuite accounts by going to NetSuite > Accounts and clicking Add.
After you have the script file ready:
3.Next, right-click in the SuiteCloud IDE editor area and then go to NetSuite > Upload File in Editor. The Upload File in Editor window opens. Wait for the progress bar to complete. The Upload File in Editor window closes upon completion.
Verify Your Script Upload
4.Right-click in the editor area and then go to NetSuite > Log in to Project Account. A browser loads with your NetSuite account logged in.
5.In NetSuite, go to Documents > Files > File Cabinet. The File Cabinet Folders page of your NetSuite account loads.
6.Navigate to the SuiteScripts directory and check your file in the subdirectory that matches your project name.
You then need to create a custom form that will link in this code.
7.In NetSuite, go to Customization > Scripting > Scripts > New. The Select Type page loads.
8.In the Type list, click Suitelet. (assuming your code is a suitelet)
9.In the Name field, enter a valid name (example: GettingStarted_SS_HelloWorld).
10.In the ID field, enter a name that begins with an underscore (example: _gs_ss_helloworld).
11.In the Scripts subtab, select your *.js file in the Script File dropdown list.
12.In the Function field, enter the function name that you wrote. Use the exact case and do not use the parentheses.
13.Hover over the dropdown arrow on the Save button, and then click Save and Deploy. The New Script Deployment page loads.
14.In the Title field, enter the Name value from step 9.
15.In the ID field, enter the ID value from step 10.
16.In the Status dropdown list, select Testing.
17.Click the Links subtab.
18.In the Center dropdown list, select Classic Center (or whichever Center is appropriate).
19.In the Section dropdown list, select the menu where you want this to appear (example: Setup).
20.In the Category dropdown list, select the submenu on the menu where you want this to appear (example: Custom).
21.In the Label field, enter the exact item on the menu that you want the user to select (example: Getting Started).
22.Click Add.
23.Click Save.
Test Your Script
24.In NetSuite, go to the menu, submenu, and item specified in steps 19, 20, and 20 (example: Setup > Custom > Getting Started). The page you just created should load.
You should create a Suitelet with a form and then create url using N/url and open it using https or nlExtOpenWindow from client side.

Execute action/button when user hits enter

Application uses frameset, where top frame contains banner (form) with searchbox (text field rendered OS style) and button to perform search.
Users want to execute search when they hit enter in that field.
I have already implemented javascript (in Notes client at form level) to catch 13 key and issue button.click(). This was very troublesome (if user keeps application open for long time, Notes client usualy hangs).
I am looking for solution / ideas to make this work - if user hits enter in text field, some action will be invoked (#Formula, LotusScript, JavaScript).
Using Javascript in the Notes client you can set a timer to poll the search field every, say, half second, and trigger your search function when you see a Newline / CR character in the search field. See this post for more details and actual code sample:
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/c7ce0bad6b6ec83385257180007d6761?OpenDocument

XPages Mobile Controls - sessionScope variable being lost

I am building a mobile app for iPhone using the mobile controls in the XPages Extension Library.
The first page displays a list of categories (happens to be a list of user names). When a category is selected the second page is displayed listing all documents belonging to the selected user.
The URL to open the second page includes a parameter with the user's name. The second page has a page heading control and on the "label" property I have added the following code:-
if (param.get("User") != null) {
sessionScope.put("UserName", param.get("User"));
}
return sessionScope.UserName;
I'm doing this so that I have access to the user name on subsequent pages, e.g. the third page is displayed when the user opens a document from the list on the second page.
When I test this in Chrome everything is fine. When I test in Safari I can see that the sessionScope variable is set when the second page is opened. However, when I select a document and the third page is opened the sessionScope variable is disappearing. I can't see any code that would explain this and when tested in Chrome the sessionScope variable is still there on page 3. Unsurprisingly I get the same issue when I test on an iPhone.
The problem this gives me is that, when navigating back from a document (p.3) to the list of documents for the selected user (p.2) I don't know which user was selected originally.
Anyone seen this before or have any explanation as to what might be going on?
Thanks for any suggestions.
you might want to refrain from the parameter approach unless you are sanetizing your input first, so instead of the URL write the userName directly into the scope - or even easier - bind the first field with the categories to the sessionScope. Did u try to modify your code to use a different variable name?

How to show list of custom objects in a page in Drupal

I want to create a page in Drupal 6 where I can show list of restaurants.When a user clicks on any restaurant page, I should be redirected to Restaurant details page.
For this :
1.) I created a new content type called "Restaurant" with some fields.
2.) Created 3-4 content items for Restaurant( Restaurant1, Restaurant2, Restaurant3)
3.) Created view called: RestaurantList, Added Fields for it. Then added Page Display and gave the path for it http://website/Restaurants
Now, when I browse to Restaurants page, I only get labels of my fields but no values. How can I get the values but not the labels? Also, I want to go to the RestaurantDetails page. How can that be achieved?
Thanks,
Rashmi
Well if I were to set up a page view this is how I would set it up:
Filters:
Node type - Restaurants
Node published - Yes
Fields
Node title
check the option Link this field to it's node
leave the Label: field empty
check option Hide if empty
And if your view style is a HTML list, for extra you can go to Row style options and check the option: Hide empty fields
Make sure you click Preview to see if you get any values. If you don't then there's something wrong with the view settings, most probably the filters which are to restrictive. Start with something loose, like Node type - Restaurants.

Hidden tabs in google chrome extensions

I've a chrome extension that sends a message from the content script to the background page and logs the tab_id of the content script.
I noticed that on google.com|de|at two messages are logged thus two content scripts are created: one for the actual web page shown in the tab (e.g. https://www.google.com/search?q=python+standard+library ) and another content script for the first item in the google result list ( in the above example http://docs.python.org/library/ )
Even stranger - the tab_id of the second content script (the hidden one) is not valid. I.e. chrome.pageAction.hide(tab_id) causes the following error to appear:
Error during pageAction.hide: No tab with id: 71
Is there a way to figure out if a content script belongs to a "hidden" tab?
thanks,
Peter
First of all, you can use onCreated and/or onUpdated to keep track of tabs and url mappings without the need for a content script.
However, if there's more to your content script than just informing the background page of the tab id, it may mean more checking.
If your content script is run on all_frames, then you will be getting messages from the content script in the top window and all internal frames. Still, when I test a sample implementation, I get the same IDs for all of them. Also, none of them appear to be from entries in the search result list.
If you are running the script in all tabs, you can ensure that only the top window sends the message by wrapping your sendRequest call with an if (window.top === window).
Could it be possible that you have another extension running that previews google results somehow? That may have this effect....

Resources