Acumata Web Service Endpoint add Vendor Locations - acumatica

I'm trying to use a Contract API application to edit and maintain vendor Locations.
I'm slightly confused on how I add a detail to the web service endpoint. I can easily add fields, but it seems when I try to add a new element it's not actually loading anything.
Here is what I did:
Added Object with name "Locations" and type "Detail"
Under that, added a top level call "Location" with screen id "Customer Locations"
Added fields to that
I used this VB code:
VendorFind = soapClient.Get(New Vendor With {.ReturnBehavior = ReturnBehavior.All,
.VendorID = New StringSearch With {.Value = "V01026"},
.Locations = New Locations() {New Locations With {.ReturnBehavior = ReturnBehavior.All}}})
It compiles and works but doesn't load the locations.
Anyone have any thoughts on how I achieve this?

For your custom endpoint you might want to use the 'Populate' option on the web service endpoint screen and select the required fields . Use the Vendor Location summary to get header information like vendor, location name etc and then select the details by selecting the correct mapped object for instance "General Info--> Location Contact " . This works fine and populates location details correctly for a selected vendor using postman tool . I am not much familiar with Vb but I suppose the issue might be in the way the endpoint entities are extended.

Related

Create category through javascript based outlook-addin

I want to create email category through java script based outlook-addin, searched through documentation however it seems they have not exposed the api in js.
help appreciated.
In addition to using EWS, it's also possible to create and set categories using REST from an add-in.
Categories can be read and set on a message. And master categories can be created as well. A benefit of creating the master category first is you can set the color of the category.
The difference between setting the category on the server and using the client-side JavaScript API (currently in preview), is when the category is set on the server, it will not appear right away in the client.
Office.Categories API Interface is currently in preview. You have the option to wait a while till next release or implement it by sending EWS request via makeEwsRequestAsync request and set the category for an item in Exchange.
To set/get categories of the message you may use 2 different message properties ...
"Custom" property with Id "00020329-0000-0000-C000-000000000046" ("Keywords") and type of "StringArray"
"Field" property with id "item:Categories" ("_Categories"), same type "StringArray".
Please note if category is not on the Master categories List, you still able to set it for the message, but it will have white color.
More information on EWS approach (with XML example) can be found at How to create/set category to email in OWA add-in.

MS PowerApps Deep Linking

I'm passing a parameter to a PowerApp through the calling URL called ID, i.e.
https://web.powerapps.com/apps/powerappid?ID=32
When the app launches I want it to jump from BrowseScreen1 which lists all the Business Cases and go straight to the Business Case with the matching ID (a field from a SharePoint list).
I'm brand new to PowerApps but pretty sure what I need to do is called Deep Linking and I found this tutorial https://powerapps.microsoft.com/en-us/blog/powerapps-deep-linking/ and having read the comments to the article I'm trying to apply it to the OnStart property of BrowseScreen1. I don't really understand how the navigation link in the tutorial is constructed so I'm sure I'm using the wrong Navigation parameters as it always launches the first record in the list ignoring anything to do with the ID. I'm using:
If(Not(IsBlank(Param("ID"))),Navigate(DetailScreen1,
None,{ID:LookUp('Full Business Case For Review'.ID, ID =
Value(Param("ID")))}))
'Full Business Case For Review' is the name of the Sharepoint list and ID is a unique field that gets assigned to each list item.
The tutorial doesn't mention having to change anything on the detail screen but I've also wondered if I need to perhaps change the item properties there as they are currently:
BrowseGallery1.Selected
I'm feeling out of my depth and would really appreciate some help on this!
Thanks,
John
Yes, you need to change the Item property in the detail screen. This is because there is currently no way to select an item in a gallery programmatically in PowerApps.
I normally get around this by using a global variable to store the current item, so you can set BrowseSreen1.OnStart to this
If(Not(IsBlank(Param("ID"))),
Set(CurrentItem, LookUp('Full Business Case For Review'.ID, ID = Value(Param("ID"))));
Navigate(DetailScreen1, None)
)
This will store the item with ID equal to your parameter as a record type variable.
You also need to change the OnSelect property of your BrowseGallery1's template or whichever control is used to navigate to the detail screen. It will need to be something like this
Set(CurrentItem, ThisItem); Navigate(DetailScreen1, None)
Finally set the Item property in the detail screen simply to this
CurrentItem

SharePoint 2013 Online - How to set up a filtered column linked to itself

I am a newbie with SharePoint. I have set up a document library. One of the columns is a unique id for a document. Another column called Related Document is a lookup field that may contain a clickable link to another document's unique id.
How to automatically fill in related document column with the link to the original document? That is, if I make document A be related to document B, I would like to automatically add a relationship from B to A as well. Not sure if it's possible to do with Related items feature - it does not seem to allow a clickable link.
Thank you.
The only way I can realistically see this being done is with a Remote Event Receiver. https://msdn.microsoft.com/en-us/library/office/jj220043.aspx
I can't think of a way out of the box that would do this.
You will need to create a SharePoint Add-in and deploy it to your SP Online instance. The remote code will get hosted on an Azure instance.
The remote code will get triggered when a document is updated.
You can then get a reference to the related document and fill in the related document link field accordingly.
You can pass parameters with the source parameter of SharePoint. This is actually to forward an URL to jump back to, but can be used to automatically pass parameters to the second form of the library.
Here is a small function that opens an upload dialog e.g. to be inserted in a content editor WebPart:
function openUploadDialog(passParameterName, passParameterValue)
{
var dialogOptions = SP.UI.$create_DialogOptions();
dialogOptions.url = "/_layouts/15/Upload.aspx?List=[INSERT_LIST_ID_HERE]&RootFolder=&IsDlg=1&source=%2fSitePages%2f[SOME_SITE_OF_YOURS].aspx%3f" + encodeURIComponent(passParameterName) + "%3d" + encodeURIComponent(passParameterValue);
dialogOptions.width = 700;
dialogOptions.height = 310;
dialogOptions.title = "Submit Document";
dialogOptions.dialogReturnValueCallback = Function.createDelegate(null, CloseThisDocCallBack);
SP.UI.ModalDialog.showModalDialog(dialogOptions);
}
openUploadDialog([NAME_OF_YOUR_ID], [VALUE_OF_YOUR_ID])
Short:
Add a field with the ID (or whatever you want) to your Library
Create a Content Editor or script WebPart where every you want and use the
function to open a dialog
look at the source of this webpart to find out the DOM ID of the field
Add another webpart to your Upload Form (Ribbon => Library => Form Webparts => Default Editor Form) to take the value from the source paramter (e.g. via JQuery) and write it into the new field you've just created.
Something like this:
id = GetUrlKeyValue('[NAME_OF_YOUR_ID]');
$('#[DOM_ID_OF_YOUR_CUSTOM_FIELD]').val(id);
I used this once to add an ID of a list element to the file. Hope that this is what you were looking for.

How to set display name of a workflow in SharePoint 2010 programmatically

I'm having an issue setting the display name for a workflow on feature activation.
What I have got is a workflow that I create with a desired internal name (using SPWorkflowAssociation.CreateListContentTypeAssociation to get an SPWorkflowAssociation object). Once the name is set with that method call, I set the SPWorkflowAssociation.Name to the desired display name after that, add the workflow association to the list, and then call update on the associated list.
The result I see is that the internal name and the display name are both changed (internal name is required to link between the SharePoint list and the Client Side Object Model and we need this internal name as the display name is different for other languages).
Does anyone know how to set this properly in code? It looks like something that should be possible but I'm getting no joy from my investigations.
Thanks!
I got around this by using the description field to store a 'static' name and then later find associations via this description field rather than the internal name.

Retrieving User Name in Sharepoint?

How does Sharepoint retrieve the user's actual name as displayed in the top right corner? e.g Welcome John Smith
I need to call this name as a variable or parameter on custom code in the XSL editor but I can't figure out how I can retrieve it, is it a global variable?
You can get a user's account name using the server variable LOGON_USER. However, this doesn't return a user's Display name.
I was able to get something working which a combination of web parts to display their name:
Add a UserContextFilterWebPart (you may need to enable this web part in the web part gallery).
Add a DataView webpart which queries the GetUserInfo method (part of the UserGroup.asmx web service).
a. Click "Connect to a web service..." in the Data Source Library pane under XML Web Services
b. Enter the Service description location (the URL to the UserGroup web service). Ex: http://server/sites/SiteCollection/SubSite/_vti_bin/UserGroup.asmx?WSDL
c. Click Connect (or reconnect)
d. Choose GetUserInfo for the Operation dropdown (the other dropdowns should be ok)
e. Modify the userLoginName parameter and check the box to allow the value to be set via web part connection. I also added a default value to test (ex: domain\login).
f. Click OK.
g. Click on the data source and click Show Data
h. Choose the columns you need and then drag them onto the page
Connect them together using web part connections (UserContext provided to the DataView).
If you want to use SPServices (which is great, btw):
function getCurrentUsersName(){
var firstName = $().SPServices.SPGetCurrentUser({
fieldName: "FirstName",
debug: false
});
return firstName;
}
function getCurrentUsersLastName(){
var lastName = $().SPServices.SPGetCurrentUser({
fieldName: "LastName",
debug: false
});
return lastName;
}
You can look up a host of other similar fieldnames here:
I believe it's coming in through NTLM Authentication/Active Directory. I ususally get login name DOMAIN/User in the HttpContext.Current.User.Identity.Name field, and then match against Active Directory and bring back the actual name of the user.
SPContext.Current.Web.CurrentUser.LoginName will give you the value for the login name of the current user, as displayed in the top right of a standard portal.
If you want to use this with XSLT, you need to find a way of assigning this to an XSL parameter value at run-time.

Resources