Acumatica Web API popup Note (Enter Record Note) - popup

I saw that once the Document is Closed/canceled/hold, there is no way to change any data field but the "Notes". Then Document notes is the way to save some critical information we need to track about the document.
So I think to create a new Screen to manage the "Record notes" using the guid as parameter.
Before go any further, is there a simple way to update the Notes if I know the guid, without using the SO screen?

You can create a custom screen which displays the notes related to an object, in your case an SO. You will need a selector to select the order number, and then using said order number, you can link it to its notes. Here is an example view to get the note you will edit:
public PXSelectJoin<Note, InnerJoinSingleTable<SOOrder, On<SOOrder.noteID,
Equal<Note.noteID>>>, Where<SOOrder.orderNbr, Equal<Current<SOOrder.orderNbr>>>> SONote;

Related

formio: How to populate fields without custom javascript code?

I have searched for hours and tried several approaches. No luck.
Scenario:
There is a formio Resource Form for Doctors that includes the Doc's practice number, name, address, etc.
A new form is created for prescription medication. The form has a Select component to find the doctor's practice number. Once the correct doctor is selected, the fields showing the Doc's name, surname, address, etc., must be automatically populated.
I understand that anything is possible with custom code, but this is such a common requirement that I'm convinced it can be done with standard functionality.
Can you show me how to do this?
Thanks,
Alan
In the validation tab, do a custom validation.
Using the drop down's value, look up the doctor's information.
Then, use the following code as a guide to update your fields.
FormioUtils.searchComponents(form.components, {key:"address"})[0].setValue("PO Box 123");

Trigger a plugin step on "entityimage" change

I created a plugin that should upload the contact entity "entityimage" to an external storage.
The code itself should works (it works as a console app), but I am unable to add a step that trigger on "entityimage" change as I can't find it in the filtering attribute list in the Plugin Registration Tool.
Is there a way to trigger this plugin only when "entityimage" change?
Regards,
Dremor
Reviewing the Contact's entityimage field in the Metadata Browser indicates that it is a "Virtual" field, which may be why it is unavailable as a filtering attribute.
Also, according to the SDK there does not appear to be any other message available besides "Update" on the Contact that could be used to indicate that the entityimage has changed.
And, changing the image through the UI does create an Audit History entry, however, it is a generic "Update" entry, with the old value and new value blank.
It appears that triggering a plugin on change of only the entityimage field is not possible, nor do there appear to be any OOB hooks to see if that field has changed.
The only other think I can think to research is Change Tracking. Otherwise it looks like you may have to upload the image on any Update of a Contact.
Or, you could sync the image URL's from CRM to an external system and compare the one in CRM to the external system before uploading.
Strangely enough, if you don't set any filtering attributes the plugin does get triggerd when changing the image, but i guess this also means that all field changes will trigger it.

Word API Custom Properties

I need some help on word add-ins
I will be programmatically creating a document and as part of that I need to add custom property (Pub_Doc_ID) to the document, as in the picture below.
I am using Word Java APIs now and could not find a way to do this job. The work flow I am targeting is very simple. Create a Document, get the Pub_Doc_Id from DB which is primary Key and assign to the document. Now primary key is attached to the document, so it will be lived with document.
Some more background :
As I mentioned earlier I am using Word APIs. I am adding text, sections, images etch. Now I need to have one connector (Pub_Doc_ID) between Doc and DB. So wanted to use custom properties. If there is any better way to do it. Then let me know.
I know how to do this in VSTO. I am looking for Word Java API.
This pub_doc_id ID then I will be using to call API's and to load task pane.
Thanks, really appreciate any help on this.
*Pub_Doc_Id : Publishing Document ID.
R/W access to custom properties is something my team is working on and would be delivered towards the end of the year.
Seems that for your scenarios you don't necessarily need to store that information as a custom property and you have a couple of alternatives in the meantime:
You can add your own customXmlPart to the doc to store this information. Here is a great example on how to use this: https://github.com/OfficeDev/Word-Add-in-Work-with-custom-XML-parts/tree/master/C%23/CustomXMLAppWeb/App
You could also store it a setting of your add in. Check out the settings object and how to store and retrieve settings: https://dev.office.com/reference/add-ins/shared/document.settings
Hope this helps!!
Thanks
You cannot presently access custom properties via the JavaScript API. They are currently working on it and have put information about proposed APIs on GitHub

Sails.Js implement friendly url

I'm new on sailjs. Do you know if it is possible to implement a friendly URL system ?
For exemple, if i want to manage products, how can i handle it in my controller by the formatted title instead of just id.
Thanks
Sailsjs has no built in support for this but the steps you have to take are pretty simple.
These formated strings in your urls are called slugs. A quick search on npm delivers several results.
The way to handle slugs with sails is to implement lifecycle callbacks (scroll down a bit to the section about the callbacks) on your product model.
Use the beforeCreate method and generate your slug into a property on your model. Inside beforeUpdate you should check if the data that you have slugged before has changed and create a new slug if needed.
Create a matching route. e.g /product/:slug
In your controller you just switch your where clause from the product id to the property you generated in your models beforeCreate method.
If the possibility exists that two products have the same name you should add the product id or other unique info to the slug.
happy coding. if something is unclear leave a comment

save the state for table items

I have one requirement that I need to mark the table item when the user has already viewed that item in the table.
It is exactly like emails in the inbox. when the user reads the mail, the font will be changed to normal. The same way I need to implement. For that I used Font for the table. Now i need to save the state for the table item. When the application restarts, the table item which the user has already viewed should be seen as viewed item. I mean normal font. Is ther any way to save the state for the table item?
Thanks
Bhanu
An alternative - if we are only talking very little data, e.g. a pointer to the last read item - you can use the view state. See IViewPart.init(IViewSite site, IMemento memento) and IViewPart.saveState(IMemento memento). This method is not very useful if you have lots of data as the storage is rather ineffective.
If your bundle activator subclasses org.eclipse.ui.plugin.AbstractUIPlugin or org.eclipse.core.runtime.Plugin you can use org.eclipse.core.runtime.Plugin.getStateLocation() to get your plugin state location. You can use java.io.File and FileReader/FileWriter to store information there across sessions. See org.eclipse.ui.plugin.AbstractUIPlugin.saveDialogSettings() for an example of how a this plugin stores dialog settings there.