I am using acumatica and trying to delete record by the REST API EndPoint
you should be able to do it like the following (using Sales Order as an example)
DELETE : {{BaseUrl}}/entity/{{EndpointName}}/{{EndpointVersion}}/SalesOrder/{{SalesOrderType}}/{{SalesOrderNbr}}
DELETE : {{BaseUrl}}/entity/{{EndpointName}}/{{EndpointVersion}}/SalesOrder/{{id}}
Remove a Record by Key Fields:
https://help.acumatica.com/Help?ScreenId=ShowWiki&pageid=d806636f-3cb8-4fd6-bc1e-fef9cdf9683d
Remove a Record by ID
https://help.acumatica.com/Help?ScreenId=ShowWiki&pageid=04825ddc-c3af-49de-8663-ae119e84b987
Related
I've scripted something to create dashboards in DevOps and it seems to do the trick, but I've noticed an issue that I could do to resolve.
The issue is duplicates.
Although you can't have the same dashboard name if you put them in as team dashboards, putting them in as project dashboards allows it. I learn something new every day.
I've got a number of projects to go through to find and locate these duplicates - and wondered what the easiest and safest way would be to identify duplicates (and if possible delete them) based on the dashboard name?
Is this even possible? From what I've read, I can delete dashboards based on an id (but not name) which is fine so long as I can still pick out projects with more than one dashboard that have the same name.
If you want to find and delete duplicate dashboards, first you can call the REST API1 with Postman to get a list of dashboards under a project. From the attached screenshot, we can see that the parameter "dashboardScope" represents the project, and "name " represents the dashboard name, id" represents the dashboardId. We can see that there are two duplicate dashboard names: Hello World in the UI interface.
The dashboard name duplicated in the UI interface
The dashboard name duplicated in the REST API
Then we use the dashboardId obtained by calling REST API1, and then call REST API2 to delete the duplicate dashboard name. You need to note that this also deletes the widgets associated with this dashboard.
Delete duplicate dashboard name with REST API
The only dashboard in the UI interface
REST API1:
GET https://dev.azure.com/{organization}/{project}/_apis/dashboard/dashboards?api-version=6.0-preview.3
REST API2:
DELETE https://dev.azure.com/{organization}/{project}/_apis/dashboard/dashboards/{dashboardId}?api-version=6.0-preview.3
I am creating an Azure Logic app which takes data from an external source and populates Dynamics 365.
In the Dynamics 365 entity, I have 4 lookup fields which I need to populate. But from the external source, I am getting data in text format, which means I need to search value for lookup fields by text instead of Guid.
I am doing this by creating an Azure function but want to know if there is any possibility to achieve this with no code customisation? External data source can only send text as Dynamics 365 guids are not synced with source.
Thanks
You can directly search using your logic app itself. There is an CDS connector step as "get Records", wherein you can filter query and match it based on your text criteria.
It can be you might get more than 1 record, ex: Account name: ABC company can be double in your crm.
you might want to narrow it down to fetch the desired result.
Once you get your Record you can use record and it's guid to fill your Lookup Field.
Refrence to get Records
Here is latest Microsoft Doc for fetching record in logic apps
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
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
I have a custom page where I'm pulling entities via the ODATA rest url like this:
http:/[myCRMURL]/AccountSet?$filter=SomeColumn eq 'SomeValue'
I also have some Views declared under the entity in addition to the build in views:
Account Advanced Find View
Account Associated View
Account Lookup View
Active Accounts
Inactive Accounts
My CUSTOM FILTER
Is there a way via the ODATA rest API that I can pull the list of views for an entity? My google-foo is completely failing me today.
If so is there a way to apply one of those filters via the REST API? Something like AccountSet?$viewId=[the GUID of the view]
You can query the views via the Rest API by hitting the UserQuerySet and the SavedQuerySet. That will allow you to retrieve the information for the views like the columns, fetchXml, view name, etc. However once you retrieve that view you will then either need to execute the fetchXml via the SOAP endpoint, or translate the filter criteria into the OData query yourself.