Get Custom Field from Acumatica using webservice - acumatica

I customized screen of Acumatica by new text fields in customer screen below:
After I want get data from custom field in below code but it's not working:
foreach (CustomStringField customField in customerData.MainContact.Address.CustomFields)

You can go to Web Service Endpoint screen to create new endpoint by click extend endpoint from default endpoint. You need to find Endpoint > Customer then click on fields tab and click populate(click EXTENDENTITY to Enable). Then search for Main Address and you will see your custom field.

If you don't want to modify the existing endpoint but just get "Custom" fields then you can append an additional value to the URL
http://help.myob.com.au/advanced/whitepapers/MYOB%20Advanced%20-%20REST%20API.pdf - MYOB Advanced uses the same accumatica system
Search for $custom Parameter - in the parameter string you would attach $custom=ItemSettings.PostClassID to get one of the custom fields.
You can get a list of Custom fields using the getSchema method
http://accumatica/entity/Default/6.00.001/StockItem/$adHocSchema
http://accumatica/entity/Default/6.00.001/StockItem?$custom=ItemSettings.PostClassID

Related

How can I create a template with fields that is view only? [DocuSignApi]

I have a template that is configured with a recipient that has read only fields and only a signature control. The read only fields/tabs are populated in the view request my API sends to DocuSign to get the signature url. However I'd like to create a new duplicate template that does not have the signature control and is configured to only require the recipient to view the document. This way the only signature event that is set by DocuSign is "viewing_complete" and not "signing_complete" when they're done viewing the template/document.
Edit: The purpose of this is it gives the user a read only view of the template/document so they can catch any errors in the mapped fields/tabs to give them a chance to correct it before signing a final version.
Not sure if you want to create this template from the API or from the web app.
You can easily do this from the web app and if you want to do from the API, you can get a log of the API calls to see how it was done.
When you create a template from the web app, in the first screen, you can pick recipients and there's a drop down with different types of recipients:
Select the "Needs to View" recipient type for your needs.
It's not possible to configure a template to accept populated tabs for a recipient that is set as Needs to View or to preview an envelope recipient view and have the tabs populated, but not show the Signature control.

Dependent controls functionality in Azure AD B2C Signup page

I am using the AD B2C custom policies to achieve the Sign-in and Signup.
In the Signup page, I need to have a dependent controls functionality. Like, once I enter a value in a text box and focus out, a rest API call should be made to pull the information from the Database and need to display that information in the next controls in the read only mode.
For example,
If I enter a postal code, It should auto populate the city information
If I choose a city, It should auto populate the state and country details.
Please suggest a way to achieve this scenario.
You can use javascript with the custom policies for your requirement. Once the postal code is entered in the text filed you can call an REST API and generate a dynamic dropdown box with javascript to bind the city details based on the dropdown selection you can bind the required filed.
There is a sample similar to you requirement. Please refer this it will be helpful

Acumatica REST API - need info on API to show Account Inquiry / Customer Open Balances

Want to know the Acumatica REST API to be used to get Account Inquiry / Customer Open Balances. If no such web services then how to extend end point using which modules of acumatica erp
Not sure exactly what information yo are looking for but maybe the following screens could contain it :
Account Summary (GL401000)
Account Detail (GL404000)
Customer Summary (AR401000)
Customer Detail (AR402000)
Though only one of these screen is already mapped in the Default endpoint of version 18.200.001 (Account Summary -> AccountSummaryInquiry)
If you need information from the other screen, you will need to either create a custom endpoint or extend the default one (I recommend extending).
Here is information on how to do both:
Creating a new endpoint, it also contain information on how to add new entities in an endpoint : https://help-2019r1.acumatica.com/(W(14))/Wiki/ShowWiki.aspx?pageid=709351cc-566a-47b3-b153-3a9fdd690ce0
Extending an endpoint : https://help-2019r1.acumatica.com/(W(13))/Wiki/ShowWiki.aspx?pageid=c450492e-06fe-4563-95c3-efa76975415b
I recommend that you take a look at the way the AccountSummaryInquiry entity is defined and follow the same way to create the other screens if this is what you do. I mean by that that you put the parameter of the inquiry in the top level entity and the fields of the grid in a detail type sub entity.
And in order to retrieve the information properly I recommend that you use a PUT request instead of a GET as this is the proper way to do so as mentioned in the following article:
https://help-2019r1.acumatica.com/(W(12))/Help?ScreenId=ShowWiki&pageid=6340cff3-4732-4231-9e42-5d1e5e65b5dd

Acumatica Rest API Endpoint mapping unbound fields or fields that are not on the screen

Is it possible to map fields that are not on the screen using the Contract Based API? In the SOAP API you could assign a value to a field not on the screen by using the Object and Field Names. I don't see any way to do this in the Contract Based API.
To map fields that are not on the screen in a web service endpoint, you should manually type DAC field name in the Mapped Field column. For an example, check how LastModifiedDateTime was mapped for the SalesOrder entity inside the Default endpoint:

Pre-populate contact information

If a person has previously filled out a contact us form on our website, the next time they visit that form I would like their information pre-populated. Using Kentico EMS and the form builder, how can I make that happen?
you can access the contact informant via macros or custom macro methods and place it in the contact form default values (I would use an alternative form), but often you do not know if the user already exists unless they are logged in or enter the same email (which you would then need to add a client side trigger to Ajax an api once the email field is filled out, check for that contact in the api, return json of their info and populate the form).
to build the api you can either use the Kentico rest service or if you need more flexibility use the web part to api coupled with a repeater with custom query, adding the right where condition through macros.

Resources