I am attempting to update a list item using the SharePoint REST API but am encountering the following error:
<?xml version="1.0" encoding="utf-8"?>
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-1, Microsoft.SharePoint.Client.InvalidClientQueryException</m:code>
<m:message xml:lang="en-US">The expression "web/lists/GetByTitle('Drop Off Library')/items("http:/example.com/_api/Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')")" is not valid.</m:message>
</m:error>
After adding the file, I receive the following response:
<?xml version="1.0" encoding="utf-8"?>
<entry xml:base="http://example.com/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<id>http://example.com/_api/Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')</id>
<category term="SP.File" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Author" type="application/atom+xml;type=entry" title="Author" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/Author" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/CheckedOutByUser" type="application/atom+xml;type=entry" title="CheckedOutByUser" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/CheckedOutByUser" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EffectiveInformationRightsManagementSettings" type="application/atom+xml;type=entry" title="EffectiveInformationRightsManagementSettings" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/EffectiveInformationRightsManagementSettings" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/InformationRightsManagementSettings" type="application/atom+xml;type=entry" title="InformationRightsManagementSettings" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/InformationRightsManagementSettings" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ListItemAllFields" type="application/atom+xml;type=entry" title="ListItemAllFields" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/ListItemAllFields" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/LockedByUser" type="application/atom+xml;type=entry" title="LockedByUser" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/LockedByUser" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ModifiedBy" type="application/atom+xml;type=entry" title="ModifiedBy" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/ModifiedBy" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Properties" type="application/atom+xml;type=entry" title="Properties" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/Properties" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Versions" type="application/atom+xml;type=feed" title="Versions" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/Versions" />
<title />
<updated>2019-01-11T14:47:13Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:CheckInComment></d:CheckInComment>
<d:CheckOutType m:type="Edm.Int32">0</d:CheckOutType>
<d:ContentTag>{2BDD4E2D-79C8-4F6B-8DD7-AC745D9360A8},1,1</d:ContentTag>
<d:CustomizedPageStatus m:type="Edm.Int32">0</d:CustomizedPageStatus>
<d:ETag>"{2BDD4E2D-79C8-4F6B-8DD7-AC745D9360A8},1"</d:ETag>
<d:Exists m:type="Edm.Boolean">true</d:Exists>
<d:IrmEnabled m:type="Edm.Boolean">false</d:IrmEnabled>
<d:Length m:type="Edm.Int64">4</d:Length>
<d:Level m:type="Edm.Byte">255</d:Level>
<d:LinkingUrl></d:LinkingUrl>
<d:MajorVersion m:type="Edm.Int32">1</d:MajorVersion>
<d:MinorVersion m:type="Edm.Int32">0</d:MinorVersion>
<d:Name>b.txt</d:Name>
<d:ServerRelativeUrl>/DropOffLibrary/b.txt</d:ServerRelativeUrl>
<d:TimeCreated m:type="Edm.DateTime">2019-01-11T14:47:13Z</d:TimeCreated>
<d:TimeLastModified m:type="Edm.DateTime">2019-01-11T14:47:13Z</d:TimeLastModified>
<d:Title m:null="true" />
<d:UIVersion m:type="Edm.Int32">512</d:UIVersion>
<d:UIVersionLabel>1.0</d:UIVersionLabel>
<d:UniqueId m:type="Edm.Guid">2bdd4e2d-79c8-4f6b-8dd7-ac745d9360a8</d:UniqueId>
</m:properties>
</content>
</entry>
My assumption here is that the item id is either the value of the <id> tag or the value of the <UniqueId> tag, but neither have worked.
First you should set Accept header to application/json for your request so the result will be a bit better to read.
Item ID is an incremental integer in the library. You can add column ID to a view in the library to see the value for each file. From some reason this ID is missing in the response you get when the file is uploaded.
To get item by ID (best option) use:
/_api/web/lists/getByTitle('Drop Off Library')/items(1)
To get item by server relative url (also fine option) use:
/_api/web/getFileByServerRelativeUrl('/DropOffLibrary/b.txt')
UniqueId is a guid which cannot be easily used for querying the item. You would have to use $filter parameter, but it is not optimal due to performace impact.
/_api/web/lists/getByTitle('Drop Off Library')/items?$filter=GUID eq guid'2bdd4e2d-79c8-4f6b-8dd7-ac745d9360a8'
I have been trying to get Note Text to show up into a generic inquiry screen but it seems that it just shows a paperclip like an attachment but nothing is actually attached to it. It brings up the file manager when you click on the paperclip in the grid. Essentially the main goal here is to get the notes text to display in the results grid. I have setup a DAC that is from the Service Order table to the notes table. And I did the relation of ServiceOrder Left JOIN to Notes and the key field is the NoteID.
Here is the XML for the Generic Inquiry:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
<relations format-version="3" relations-version="20170805" main-table="GIDesign">
<link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
<link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationParameter (DesignID, ScreenID)" to="GINavigationScreen (DesignID, ScreenID)" />
<link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
<link from="GIRecordDefault (DesignID)" to="GIDesign (DesignID)" />
<link from="GIRelation (DesignID, ParentTable)" to="GITable (DesignID, Alias)" />
<link from="GIRelation (DesignID, ChildTable)" to="GITable (DesignID, Alias)" />
<link from="GIResult (DesignID)" to="GIDesign (DesignID)" />
<link from="GIResult (ObjectName, DesignID)" to="GITable (Alias, DesignID)" />
<link from="GISort (DesignID)" to="GIDesign (DesignID)" />
<link from="GITable (DesignID)" to="GIDesign (DesignID)" />
<link from="GIWhere (DesignID)" to="GIDesign (DesignID)" />
<link from="SiteMap (Url)" to="GIDesign (DesignID)" type="WeakByUrl" linkname="toDesignById" baseurl="~/GenericInquiry/GenericInquiry.aspx" paramnames="id" />
<link from="SiteMap (Url)" to="GIDesign (Name)" type="WeakByUrl" linkname="toDesignByName" baseurl="~/GenericInquiry/GenericInquiry.aspx" />
<link from="ListEntryPoint (ListScreenID)" to="SiteMap (ScreenID)" />
<link from="SiteMap (ScreenID)" to="GIDesign (PrimaryScreenIDNew)" linkname="to1Screen" />
<link from="SiteMap (NodeID)" to="SiteMap (ParentID)" type="WeakToParent" recursive-nesting="yes" include-parents="False" />
<link from="GIDesign (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIFilter (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIFilter (NoteID)" to="GIFilterKvExt (RecordID)" type="RowKvExt" />
<link from="GIGroupBy (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIOn (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIRelation (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIResult (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIResult (NoteID)" to="GIResultKvExt (RecordID)" type="RowKvExt" />
<link from="GISort (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GITable (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIWhere (NoteID)" to="Note (NoteID)" type="Note" />
</relations>
<layout>
<table name="GIDesign">
<table name="GIFilter" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
<table name="GIFilterKvExt" uplink="(NoteID) = (RecordID)" />
</table>
<table name="GIGroupBy" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIMassAction" uplink="(DesignID) = (DesignID)" />
<table name="GIMassUpdateField" uplink="(DesignID) = (DesignID)" />
<table name="GINavigationScreen" uplink="(DesignID) = (DesignID)">
<table name="GINavigationParameter" uplink="(DesignID, ScreenID) = (DesignID, ScreenID)" />
</table>
<table name="GIRecordDefault" uplink="(DesignID) = (DesignID)" />
<table name="GISort" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GITable" uplink="(DesignID) = (DesignID)">
<table name="GIRelation" uplink="(DesignID, Alias) = (DesignID, ParentTable)">
<table name="GIOn" uplink="(DesignID, LineNbr) = (DesignID, RelationNbr)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIResult" uplink="(Alias, DesignID) = (ObjectName, DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
<table name="GIResultKvExt" uplink="(NoteID) = (RecordID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIWhere" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="SiteMap" uplink="(DesignID) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignById">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
</table>
<table name="SiteMap" uplink="(Name) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignByName">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
</table>
<table name="SiteMap" uplink="(PrimaryScreenIDNew) = (ScreenID)" recursion="(NodeID) = (ParentID)" linkname="to1Screen">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
</layout>
<data>
<GIDesign>
<row DesignID="f6ed028b-51d9-49e0-a893-881ac49640cd" Name="ServOrderAuditHist" FilterColCount="3" PagerStyle="0" PageSize="0" NewRecordCreationEnabled="0" MassDeleteEnabled="0" AutoConfirmDelete="0" MassRecordsUpdateEnabled="0" MassActionsOnRecordsEnabled="0" ExposeViaOData="0">
<GIFilter LineNbr="1" IsActive="1" Name="Date" FieldName="audithistory.changeDate" DataType="string" DisplayName="Change Date" IsExpression="0" ColSpan="1" Required="0" />
<GITable Alias="audithistory" Name="PX.SM.AuditHistory">
<GIRelation LineNbr="1" ChildTable="serviceorder" IsActive="1" JoinType="L">
<GIOn LineNbr="1" ParentField="combinedKey" Condition="E " ChildField="srvOrdType" Operation="A" />
</GIRelation>
<GIResult LineNbr="2" IsActive="1" Field="batchID" IsVisible="1" DefaultNav="1" RowID="2846cf9b-219c-4a5a-b209-84fddc6c2340" />
<GIResult LineNbr="3" IsActive="1" Field="changeDate" IsVisible="1" DefaultNav="1" RowID="e87e8b9b-4e65-4d74-a09b-32f9b042a2d4" />
<GIResult LineNbr="4" IsActive="1" Field="changeID" IsVisible="1" DefaultNav="1" RowID="0323d539-ec30-422a-9095-6e9a32ad0b70" />
<GIResult LineNbr="5" IsActive="1" Field="=Replace([audithistory.CombinedKey],' ','')" Caption="CombinedKey" IsVisible="1" DefaultNav="1" RowID="50807018-a8a1-422f-b4c8-85f41db06ecd" />
<GIResult LineNbr="6" IsActive="1" Field="modifiedFields" Caption="ModifiedFields" IsVisible="1" DefaultNav="1" RowID="65ff668b-1a0c-4bb6-b302-541f45c96505" />
<GIResult LineNbr="7" IsActive="1" Field="operation" IsVisible="1" DefaultNav="1" RowID="e1afd786-abdc-4011-af1b-de9a6ca8c070" />
<GIResult LineNbr="8" IsActive="1" Field="screenID" IsVisible="1" DefaultNav="1" RowID="6a779a62-58db-4033-ab1e-317eb1b5d6eb" />
<GIResult LineNbr="9" IsActive="1" Field="tableName" IsVisible="1" DefaultNav="1" RowID="6de2b416-c264-434c-8c84-5090c756dd64" />
<GIResult LineNbr="10" IsActive="1" Field="userID" IsVisible="1" DefaultNav="1" RowID="e8a8e72b-8518-42e7-b5a9-82011f366c18" />
<GIResult LineNbr="11" IsActive="1" Field="userID_description" IsVisible="1" DefaultNav="1" RowID="687c4f34-7344-4ff8-9607-249e9ee74f88" />
<GIResult LineNbr="12" IsActive="1" Field="=LEFT([audithistory.CombinedKey], 3)" Caption="WOType" IsVisible="1" DefaultNav="1" RowID="2eb4a478-e697-4f16-832a-7f03ce8e453a" />
<GIResult LineNbr="13" IsActive="1" Field="=RIGHT([audithistory.CombinedKey], 6)" Caption="WONumber" IsVisible="1" DefaultNav="1" RowID="7acd89c5-b352-4fa3-a928-a2f786e3311f" />
</GITable>
<GITable Alias="notes" Name="PX.Data.Note">
<GIResult LineNbr="14" IsActive="1" Field="noteText" SchemaField="notes.NoteText" IsVisible="1" DefaultNav="1" RowID="2f941414-94f6-4225-b37e-a26fea9d6ad4" />
</GITable>
<GITable Alias="serviceorder" Name="FieldService.ServiceDispatch.FSServiceOrder">
<GIRelation LineNbr="2" ChildTable="notes" IsActive="1" JoinType="L">
<GIOn LineNbr="2" ParentField="noteID" Condition="E " ChildField="noteID" Operation="A" />
</GIRelation>
</GITable>
<GIWhere LineNbr="1" IsActive="1" DataFieldName="audithistory.screenID" Condition="E " IsExpression="0" Value1="SD300100" Operation="A" />
<GIWhere LineNbr="2" IsActive="1" DataFieldName="audithistory.operation" Condition="NE" IsExpression="1" Value1="D" Operation="A" />
<GIWhere LineNbr="3" IsActive="1" DataFieldName="audithistory.changeDate" Condition="G " IsExpression="0" Value1="[Date]" Operation="A" />
<GIWhere LineNbr="4" IsActive="1" OpenBrackets="( " DataFieldName="audithistory.combinedKey" Condition="RL" IsExpression="0" Value1="TPP" Operation="O" />
<GIWhere LineNbr="5" IsActive="1" DataFieldName="audithistory.combinedKey" Condition="RL" IsExpression="0" Value1="LOWE" CloseBrackets=") " Operation="A" />
<SiteMap linkname="toDesignById">
<row Position="20" Title="Service Order Audit History" Url="~/GenericInquiry/GenericInquiry.aspx?id=f6ed028b-51d9-49e0-a893-881ac49640cd" Expanded="0" IsFolder="0" ScreenID="GIFR0235" NodeID="8b0a25e3-3a83-4324-80a0-7b78fe4c1e8f" ParentID="7d6dc2e0-301d-4689-b8b1-ba2f28baa299">
<SiteMap Position="4" Title="Explore" Expanded="1" IsFolder="0" NodeID="7d6dc2e0-301d-4689-b8b1-ba2f28baa299">
<SiteMap Position="1" Title="Work Area" Description="main#DataEntryF" Expanded="0" IsFolder="0" NodeID="31c4a483-3979-498e-bcc7-4891839872f5">
<SiteMap Position="1" Title="Service Management" Url="~/Frames/Default.aspx" Expanded="0" IsFolder="0" ScreenID="SD000000" NodeID="abf4d047-7c3f-40fe-abc6-89f992c9b464">
<SiteMap Position="25" Title="Service" Url="~/Frames/Default.aspx" Expanded="0" IsFolder="0" ScreenID="FS000000" NodeID="1d096eb2-3eef-4206-b801-181debd3005d">
<SiteMap Position="0" Title="Sitemap Root" Url="~/Frames/Default.aspx" Expanded="0" IsFolder="0" ScreenID="00000000" NodeID="00000000-0000-0000-0000-000000000000" />
</SiteMap>
</SiteMap>
</SiteMap>
</SiteMap>
</row>
</SiteMap>
</row>
</GIDesign>
</data>
</data-set>
Note: There is another Table Left Join on here but it should not effect the results as it is confirmed working properly. I am also using Acumatica version 6.10.2118.
Update: In my GI instance there is another table called Audit History and the joining between this table to Service Order table is compromising the join between the Notes and Service Order table. Brendan's answer does work when another table is not involved.
Sorry I do not have field service configured in my instances so I didn't look at your example GI but you should be able to include the note text as a field if you Join the note table and display the NoteText field as shown below in a quick example...
Here is the exported GI I used to test. I tested in the latest 6.1 and 2017R2 builds and both worked. This export is from 6.10.2515:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
<relations format-version="3" relations-version="20170805" main-table="GIDesign">
<link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
<link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationParameter (DesignID, ScreenID)" to="GINavigationScreen (DesignID, ScreenID)" />
<link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
<link from="GIRecordDefault (DesignID)" to="GIDesign (DesignID)" />
<link from="GIRelation (DesignID, ParentTable)" to="GITable (DesignID, Alias)" />
<link from="GIRelation (DesignID, ChildTable)" to="GITable (DesignID, Alias)" />
<link from="GIResult (DesignID)" to="GIDesign (DesignID)" />
<link from="GIResult (ObjectName, DesignID)" to="GITable (Alias, DesignID)" />
<link from="GISort (DesignID)" to="GIDesign (DesignID)" />
<link from="GITable (DesignID)" to="GIDesign (DesignID)" />
<link from="GIWhere (DesignID)" to="GIDesign (DesignID)" />
<link from="SiteMap (Url)" to="GIDesign (DesignID)" type="WeakByUrl" linkname="toDesignById" baseurl="~/GenericInquiry/GenericInquiry.aspx" paramnames="id" />
<link from="SiteMap (Url)" to="GIDesign (Name)" type="WeakByUrl" linkname="toDesignByName" baseurl="~/GenericInquiry/GenericInquiry.aspx" />
<link from="ListEntryPoint (ListScreenID)" to="SiteMap (ScreenID)" />
<link from="SiteMap (ScreenID)" to="GIDesign (PrimaryScreenIDNew)" linkname="to1Screen" />
<link from="SiteMap (NodeID)" to="SiteMap (ParentID)" type="WeakToParent" recursive-nesting="yes" include-parents="False" />
<link from="GIDesign (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIFilter (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIFilter (NoteID)" to="GIFilterKvExt (RecordID)" type="RowKvExt" />
<link from="GIGroupBy (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIOn (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIRelation (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIResult (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIResult (NoteID)" to="GIResultKvExt (RecordID)" type="RowKvExt" />
<link from="GISort (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GITable (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIWhere (NoteID)" to="Note (NoteID)" type="Note" />
</relations>
<layout>
<table name="GIDesign">
<table name="GIFilter" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
<table name="GIFilterKvExt" uplink="(NoteID) = (RecordID)" />
</table>
<table name="GIGroupBy" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIMassAction" uplink="(DesignID) = (DesignID)" />
<table name="GIMassUpdateField" uplink="(DesignID) = (DesignID)" />
<table name="GINavigationScreen" uplink="(DesignID) = (DesignID)">
<table name="GINavigationParameter" uplink="(DesignID, ScreenID) = (DesignID, ScreenID)" />
</table>
<table name="GIRecordDefault" uplink="(DesignID) = (DesignID)" />
<table name="GISort" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GITable" uplink="(DesignID) = (DesignID)">
<table name="GIRelation" uplink="(DesignID, Alias) = (DesignID, ParentTable)">
<table name="GIOn" uplink="(DesignID, LineNbr) = (DesignID, RelationNbr)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIResult" uplink="(Alias, DesignID) = (ObjectName, DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
<table name="GIResultKvExt" uplink="(NoteID) = (RecordID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIWhere" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="SiteMap" uplink="(DesignID) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignById">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
</table>
<table name="SiteMap" uplink="(Name) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignByName">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
</table>
<table name="SiteMap" uplink="(PrimaryScreenIDNew) = (ScreenID)" recursion="(NodeID) = (ParentID)" linkname="to1Screen">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
</layout>
<data>
<GIDesign>
<row DesignID="479b3a0d-2de4-4f8e-9b55-a19f3b46a36d" Name="testnote" FilterColCount="3" PagerStyle="0" PageSize="0" NewRecordCreationEnabled="0" MassDeleteEnabled="0" AutoConfirmDelete="0" MassRecordsUpdateEnabled="0" MassActionsOnRecordsEnabled="0" ExposeViaOData="0">
<GITable Alias="InventoryItem" Name="PX.Objects.IN.InventoryItem">
<GIRelation LineNbr="1" ChildTable="Note" IsActive="1" JoinType="L">
<GIOn LineNbr="1" ParentField="noteID" Condition="E " ChildField="noteID" Operation="A" />
</GIRelation>
<GIResult LineNbr="1" IsActive="1" Field="inventoryCD" IsVisible="1" DefaultNav="1" RowID="37044060-0fbb-48e5-a38f-1dc0becb6e6c" />
</GITable>
<GITable Alias="Note" Name="PX.Data.Note">
<GIResult LineNbr="2" IsActive="1" Field="noteText" IsVisible="1" DefaultNav="1" RowID="175f364b-607d-479d-b1c9-1008af652388" />
</GITable>
</row>
</GIDesign>
</data>
</data-set>
I'm working on releasing an Acumatica payment via the SOAP API as documented on page 117 of the I210 Contract Based Web Services guide here. I have implemented the code to the manual spec however when I release a payment I'm getting this error:
TX Error #3: Document Status is invalid for processing. at
PX.Objects.AR.ARPaymentEntry.Release
When I look at the status of the newly created payment, it has a status Balanced which I believe should be able to be released. Is there another status that the payment needs to be in order to be released?
My code:
//creates the order to attach the payment to
SalesOrder newOrder = (SalesOrder)await client.PutAsync(orderToBeCreated);
var wooPaymentRef = "Test";
//Create a payment for the order
Payment paymentToBeCreated = new Payment()
{
Type = new StringValue { Value = "Prepayment" },
Status = new StringValue { Value = "Open" },
PaymentMethod = new StringValue { Value = store.AcumaticaPaymentMethod },
PaymentAmount = new DecimalValue { Value = Convert.ToDecimal(wooOrder.order.total) },
CustomerID = newOrder.CustomerID,
OrdersToApply = new PaymentOrder[] {
new PaymentOrder()
{
OrderType = new StringValue { Value = "SO"},
OrderNbr = newOrder.OrderNbr,
AppliedToOrder = newOrder.OrderTotal
}
},
CashAccount = new StringValue { Value = store.AcumaticaPaymentMethod },
PaymentRef = new StringValue { Value = wooPaymentRef },
Hold = new BooleanValue { Value = false}
};
Payment newPayment = (Payment)await client.PutAsync(paymentToBeCreated);
//Extra step to get the newly created payment just to make sure it's the most recent
Payment paymentToBeFound = new Payment
{
Type = new StringSearch { Value = newPayment.Type.Value },
ReferenceNbr = new StringSearch { Value = newPayment.ReferenceNbr.Value }
};
Payment currentPayment = (Payment)await client.GetAsync(paymentToBeFound);
//Release the payment
InvokeResult invokeResult = await client.InvokeAsync(currentPayment, new ReleasePayment());
//Monitor the process
ProcessResult processResult = await LongProcessRunner.GetProcessResult(client, invokeResult);
The error occurs at the InvokeResult line.
There is nothing wrong with the code you wrote.
I asked you in the comment what version you were asking since in the newer version I was not able to reproduce the issue.
Your version is from early February 2017, I did found an issue report that was mentioning that this problem had been fixed.
Though this is for version superior to 5.30.3715 or 6.10.0680 which is around early June 2017 .
If you try your code in these version or newer it should work.
If anyone comes across this screen, not from a development perspective, but more just looking for an explanation/answer to the error, Error on batch posting: TX Error: Document Status is invalid for processing.
This solution has been provided to me by our ISV Partner + Acumatica Support. I would highly encourage you to log a support case with your ISV partner as well, as we all know that each implementation is different, but I'm leaving this answer here so that you at least know what's going on.
The root cause of the encountered error is a known issue, that is described in the following KB article.
Unfortunately, if you're not an ISV partner, you would not be able to access the link, but the contents are:
Root cause:
This error usually means that the document has already been released, but the record in the register table (APRegister or ARRegister, depending on the document type) is marked as unreleased.
In particular, this means that the following actions should not be attempted until the user confirms that the document has not been released, as described in the Troubleshooting steps section:
Deletion of the document
Any modification of released attributes through SQL
This is a known issue for the following builds of Acumatica ERP:
All builds of 2018R2 version
2019R1 Update 12 (19.112.0045) and earlier
2019R2 Update 4 (19.204.0021) and earlier
For more information, see the AC-140721 issue in the Known Issues section.
AC-140721: Rarely, after an attempt to release accounts payable or
accounts receivable documents, users could get inconsistent data. In
some cases, the document status remained Balanced, however, the
document could not be released due to the following error: TX Error:
Document Status is invalid for processing. In some other cases, a
document got the Open or Closed status, whereas no entries were posted
to GL.
This issue has been already fixed in 19.113.0043 Build Version.
We highly recommend updating the instance to this or later release of 2019R1 to prevent this issue from happening in the future.
=== Dragons Lives Beyond This Point! ===
I have been advised to follow these steps. Again, by no means does it mean that this would work for you too, so I would approach with severe caution. It would be best to approach your ISV Partner. I am however leaving the steps here for a holistic answer to the question.
As for now, to fix the corrupted documents, please use the following steps:
To find all the affected documents, please use the GI's attached in the KB article mentioned above.
Since you most likely won't have access to the KB Article, here's the XML for the 2 Generic Inquiries
GL4APReg
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
<relations format-version="3" relations-version="20190410" main-table="GIDesign" stable-sharing="True" file-name="(Name)">
<link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
<link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationParameter (DesignID, NavigationScreenLineNbr)" to="GINavigationScreen (DesignID, LineNbr)" />
<link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
<link from="GIRecordDefault (DesignID)" to="GIDesign (DesignID)" />
<link from="GIRelation (DesignID, ParentTable)" to="GITable (DesignID, Alias)" />
<link from="GIRelation (DesignID, ChildTable)" to="GITable (DesignID, Alias)" />
<link from="GIResult (DesignID)" to="GIDesign (DesignID)" />
<link from="GIResult (ObjectName, DesignID)" to="GITable (Alias, DesignID)" />
<link from="GISort (DesignID)" to="GIDesign (DesignID)" />
<link from="GITable (DesignID)" to="GIDesign (DesignID)" />
<link from="GIWhere (DesignID)" to="GIDesign (DesignID)" />
<link from="SiteMap (Url)" to="GIDesign (DesignID)" type="WeakByUrl" linkname="toDesignById" baseurl="~/GenericInquiry/GenericInquiry.aspx" paramnames="id" />
<link from="SiteMap (Url)" to="GIDesign (Name)" type="WeakByUrl" linkname="toDesignByName" baseurl="~/GenericInquiry/GenericInquiry.aspx" />
<link from="ListEntryPoint (ListScreenID)" to="SiteMap (ScreenID)" />
<link from="SiteMap (ScreenID)" to="GIDesign (PrimaryScreenIDNew)" linkname="to1Screen" />
<link from="SiteMap (NodeID)" to="SiteMap (ParentID)" type="WeakToParent" recursive-nesting="yes" include-parents="False" />
<link from="FilterHeader (ScreenID)" to="SiteMap (ScreenID)" />
<link from="FilterRow (FilterID)" to="FilterHeader (FilterID)" />
<link from="PivotTable (NoteID)" to="FilterHeader (RefNoteID)" />
<link from="PivotField (ScreenID, PivotTableID)" to="PivotTable (ScreenID, PivotTableID)" />
<link from="MUIScreen (NodeID)" to="SiteMap (NodeID)" />
<link from="MUIWorkspace (WorkspaceID)" to="MUIScreen (WorkspaceID)" type="FromMaster" linkname="workspaceToScreen" split-location="yes" updateable="True" />
<link from="MUISubcategory (SubcategoryID)" to="MUIScreen (SubcategoryID)" type="FromMaster" updateable="True" />
<link from="MUITile (ScreenID)" to="SiteMap (ScreenID)" />
<link from="MUIWorkspace (WorkspaceID)" to="MUITile (WorkspaceID)" type="FromMaster" linkname="workspaceToTile" split-location="yes" updateable="True" />
<link from="MUIArea (AreaID)" to="MUIWorkspace (AreaID)" type="FromMaster" updateable="True" />
<link from="MUIPinnedScreen (NodeID, WorkspaceID)" to="MUIScreen (NodeID, WorkspaceID)" type="WeakIfEmpty" isEmpty="Username" />
<link from="MUIFavoriteWorkspace (WorkspaceID)" to="MUIWorkspace (WorkspaceID)" type="WeakIfEmpty" isEmpty="Username" />
<link from="GIDesign (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIFilter (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIFilter (NoteID)" to="GIFilterKvExt (RecordID)" type="RowKvExt" />
<link from="GIGroupBy (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIOn (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIRelation (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIResult (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIResult (NoteID)" to="GIResultKvExt (RecordID)" type="RowKvExt" />
<link from="GISort (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GITable (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIWhere (NoteID)" to="Note (NoteID)" type="Note" />
<link from="FilterHeader (NoteID)" to="Note (NoteID)" type="Note" />
</relations>
<layout>
<table name="GIDesign">
<table name="GIFilter" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
<table name="GIFilterKvExt" uplink="(NoteID) = (RecordID)" />
</table>
<table name="GIGroupBy" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIMassAction" uplink="(DesignID) = (DesignID)" />
<table name="GIMassUpdateField" uplink="(DesignID) = (DesignID)" />
<table name="GINavigationScreen" uplink="(DesignID) = (DesignID)">
<table name="GINavigationParameter" uplink="(DesignID, LineNbr) = (DesignID, NavigationScreenLineNbr)" />
</table>
<table name="GIRecordDefault" uplink="(DesignID) = (DesignID)" />
<table name="GISort" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GITable" uplink="(DesignID) = (DesignID)">
<table name="GIRelation" uplink="(DesignID, Alias) = (DesignID, ParentTable)">
<table name="GIOn" uplink="(DesignID, LineNbr) = (DesignID, RelationNbr)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIResult" uplink="(Alias, DesignID) = (ObjectName, DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
<table name="GIResultKvExt" uplink="(NoteID) = (RecordID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIWhere" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="SiteMap" uplink="(DesignID) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignById">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
<table name="FilterHeader" uplink="(ScreenID) = (ScreenID)">
<table name="FilterRow" uplink="(FilterID) = (FilterID)" />
<table name="PivotTable" uplink="(RefNoteID) = (NoteID)">
<table name="PivotField" uplink="(ScreenID, PivotTableID) = (ScreenID, PivotTableID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="MUIScreen" uplink="(NodeID) = (NodeID)">
<table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
</table>
<table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
</table>
<table name="SiteMap" uplink="(Name) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignByName">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
<table name="FilterHeader" uplink="(ScreenID) = (ScreenID)">
<table name="FilterRow" uplink="(FilterID) = (FilterID)" />
<table name="PivotTable" uplink="(RefNoteID) = (NoteID)">
<table name="PivotField" uplink="(ScreenID, PivotTableID) = (ScreenID, PivotTableID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="MUIScreen" uplink="(NodeID) = (NodeID)">
<table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
</table>
<table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
</table>
<table name="SiteMap" uplink="(PrimaryScreenIDNew) = (ScreenID)" recursion="(NodeID) = (ParentID)" linkname="to1Screen">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
<table name="FilterHeader" uplink="(ScreenID) = (ScreenID)">
<table name="FilterRow" uplink="(FilterID) = (FilterID)" />
<table name="PivotTable" uplink="(RefNoteID) = (NoteID)">
<table name="PivotField" uplink="(ScreenID, PivotTableID) = (ScreenID, PivotTableID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="MUIScreen" uplink="(NodeID) = (NodeID)">
<table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
</table>
<table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="MUIWorkspace">
<table name="MUIFavoriteWorkspace" uplink="(WorkspaceID) = (WorkspaceID)" />
</table>
<table name="MUISubcategory" />
<table name="MUIArea" />
</layout>
<data>
<GIDesign>
<row DesignID="8dcb8839-34fc-44b9-a5f2-7a10e050d54f" Name="GL4Apreg" FilterColCount="3" PageSize="0" ExportTop="0" NewRecordCreationEnabled="0" MassDeleteEnabled="0" AutoConfirmDelete="0" MassRecordsUpdateEnabled="0" MassActionsOnRecordsEnabled="0" ExposeViaOData="0" ExposeViaMobile="0">
<GISort LineNbr="1" IsActive="1" DataFieldName="APRegister.docDate" SortOrder="D" />
<GITable Alias="GLTran" Name="PX.Objects.GL.GLTran">
<GIResult LineNbr="5" SortOrder="5" IsActive="1" Field="batchNbr" IsVisible="1" DefaultNav="1" QuickFilter="0" FastFilter="1" RowID="eeb26550-54c3-4d6e-9671-710fa929e0db" />
</GITable>
<GITable Alias="APTran" Name="PX.Objects.AP.APTran" />
<GITable Alias="APRegister" Name="PX.Objects.AP.APRegister">
<GIRelation LineNbr="2" ChildTable="GLTran" IsActive="1" JoinType="I">
<GIOn LineNbr="4" ParentField="docType" Condition="E " ChildField="tranType" Operation="A" />
<GIOn LineNbr="3" ParentField="refNbr" Condition="E " ChildField="refNbr" Operation="A" />
</GIRelation>
<GIRelation LineNbr="1" ChildTable="APTran" IsActive="1" JoinType="I">
<GIOn LineNbr="2" ParentField="refNbr" Condition="E " ChildField="refNbr" Operation="A" />
<GIOn LineNbr="1" ParentField="docType" Condition="E " ChildField="tranType" Operation="A" />
</GIRelation>
<GIResult LineNbr="4" SortOrder="4" IsActive="1" Field="docDate" IsVisible="1" DefaultNav="1" QuickFilter="0" FastFilter="0" RowID="12cad746-594e-457d-a858-0dfd7da0d016" />
<GIResult LineNbr="3" SortOrder="3" IsActive="1" Field="released" IsVisible="1" DefaultNav="1" QuickFilter="0" FastFilter="1" RowID="5d7f706a-177d-49e3-a830-97d49a920481" />
<GIResult LineNbr="2" SortOrder="2" IsActive="1" Field="refNbr" IsVisible="1" DefaultNav="1" QuickFilter="0" FastFilter="1" RowID="b17cf80d-c85d-47eb-aa39-34cdead539b9" />
<GIResult LineNbr="1" SortOrder="1" IsActive="1" Field="docType" IsVisible="1" DefaultNav="1" QuickFilter="0" FastFilter="1" RowID="657601c5-8e36-4282-8a46-6ab97e684f32" />
</GITable>
<GIWhere LineNbr="4" IsActive="1" DataFieldName="APTran.released" Condition="E " IsExpression="1" Value1="True" Value2="False" CloseBrackets=") " Operation="A" />
<GIWhere LineNbr="3" IsActive="1" OpenBrackets="( " DataFieldName="APRegister.released" Condition="E " IsExpression="1" Value1="False" Value2="False" Operation="A" />
<GIWhere LineNbr="2" IsActive="1" DataFieldName="GLTran.debitAmt" Condition="G " IsExpression="0" Value1="0" Operation="A" />
<GIWhere LineNbr="1" IsActive="1" DataFieldName="GLTran.module" Condition="E " IsExpression="1" Value1="AP" Operation="A" />
</row>
</GIDesign>
</data>
</data-set>
GL4ARReg:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
<relations format-version="3" relations-version="20170805" main-table="GIDesign" stable-sharing="True" file-name="(Name)">
<link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
<link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationParameter (DesignID, ScreenID)" to="GINavigationScreen (DesignID, ScreenID)" />
<link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
<link from="GIRecordDefault (DesignID)" to="GIDesign (DesignID)" />
<link from="GIRelation (DesignID, ParentTable)" to="GITable (DesignID, Alias)" />
<link from="GIRelation (DesignID, ChildTable)" to="GITable (DesignID, Alias)" />
<link from="GIResult (DesignID)" to="GIDesign (DesignID)" />
<link from="GIResult (ObjectName, DesignID)" to="GITable (Alias, DesignID)" />
<link from="GISort (DesignID)" to="GIDesign (DesignID)" />
<link from="GITable (DesignID)" to="GIDesign (DesignID)" />
<link from="GIWhere (DesignID)" to="GIDesign (DesignID)" />
<link from="SiteMap (Url)" to="GIDesign (DesignID)" type="WeakByUrl" linkname="toDesignById" baseurl="~/GenericInquiry/GenericInquiry.aspx" paramnames="id" />
<link from="SiteMap (Url)" to="GIDesign (Name)" type="WeakByUrl" linkname="toDesignByName" baseurl="~/GenericInquiry/GenericInquiry.aspx" />
<link from="ListEntryPoint (ListScreenID)" to="SiteMap (ScreenID)" />
<link from="SiteMap (ScreenID)" to="GIDesign (PrimaryScreenIDNew)" linkname="to1Screen" />
<link from="SiteMap (NodeID)" to="SiteMap (ParentID)" type="WeakToParent" recursive-nesting="yes" include-parents="False" />
<link from="MUIScreen (NodeID)" to="SiteMap (NodeID)" />
<link from="MUIWorkspace (WorkspaceID)" to="MUIScreen (WorkspaceID)" type="FromMaster" linkname="workspaceToScreen" split-location="yes" updateable="True" />
<link from="MUISubcategory (SubcategoryID)" to="MUIScreen (SubcategoryID)" type="FromMaster" updateable="True" />
<link from="MUITile (ScreenID)" to="SiteMap (ScreenID)" />
<link from="MUIWorkspace (WorkspaceID)" to="MUITile (WorkspaceID)" type="FromMaster" linkname="workspaceToTile" split-location="yes" updateable="True" />
<link from="MUIArea (AreaID)" to="MUIWorkspace (AreaID)" type="FromMaster" updateable="True" />
<link from="MUIPinnedScreen (NodeID, WorkspaceID)" to="MUIScreen (NodeID, WorkspaceID)" type="WeakIfEmpty" isEmpty="Username" />
<link from="MUIFavoriteWorkspace (WorkspaceID)" to="MUIWorkspace (WorkspaceID)" type="WeakIfEmpty" isEmpty="Username" />
<link from="GIDesign (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIFilter (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIFilter (NoteID)" to="GIFilterKvExt (RecordID)" type="RowKvExt" />
<link from="GIGroupBy (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIOn (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIRelation (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIResult (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIResult (NoteID)" to="GIResultKvExt (RecordID)" type="RowKvExt" />
<link from="GISort (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GITable (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIWhere (NoteID)" to="Note (NoteID)" type="Note" />
</relations>
<layout>
<table name="GIDesign">
<table name="GIFilter" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
<table name="GIFilterKvExt" uplink="(NoteID) = (RecordID)" />
</table>
<table name="GIGroupBy" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIMassAction" uplink="(DesignID) = (DesignID)" />
<table name="GIMassUpdateField" uplink="(DesignID) = (DesignID)" />
<table name="GINavigationScreen" uplink="(DesignID) = (DesignID)">
<table name="GINavigationParameter" uplink="(DesignID, ScreenID) = (DesignID, ScreenID)" />
</table>
<table name="GIRecordDefault" uplink="(DesignID) = (DesignID)" />
<table name="GISort" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GITable" uplink="(DesignID) = (DesignID)">
<table name="GIRelation" uplink="(DesignID, Alias) = (DesignID, ParentTable)">
<table name="GIOn" uplink="(DesignID, LineNbr) = (DesignID, RelationNbr)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIResult" uplink="(Alias, DesignID) = (ObjectName, DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
<table name="GIResultKvExt" uplink="(NoteID) = (RecordID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIWhere" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="SiteMap" uplink="(DesignID) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignById">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
<table name="MUIScreen" uplink="(NodeID) = (NodeID)">
<table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
</table>
<table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
</table>
<table name="SiteMap" uplink="(Name) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignByName">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
<table name="MUIScreen" uplink="(NodeID) = (NodeID)">
<table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
</table>
<table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
</table>
<table name="SiteMap" uplink="(PrimaryScreenIDNew) = (ScreenID)" recursion="(NodeID) = (ParentID)" linkname="to1Screen">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
<table name="MUIScreen" uplink="(NodeID) = (NodeID)">
<table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
</table>
<table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="MUIWorkspace">
<table name="MUIFavoriteWorkspace" uplink="(WorkspaceID) = (WorkspaceID)" />
</table>
<table name="MUISubcategory" />
<table name="MUIArea" />
</layout>
<data>
<GIDesign>
<row DesignID="188ee0c1-8090-4d7c-950d-e46a5807cbce" Name="GL4Arreg" FilterColCount="3" PageSize="0" ExportTop="0" NewRecordCreationEnabled="0" MassDeleteEnabled="0" AutoConfirmDelete="0" MassRecordsUpdateEnabled="0" MassActionsOnRecordsEnabled="0" ExposeViaOData="0" ExposeViaMobile="0">
<GISort LineNbr="1" IsActive="1" DataFieldName="ARRegister.docDate" SortOrder="D" />
<GITable Alias="GLTran" Name="PX.Objects.GL.GLTran">
<GIResult LineNbr="5" IsActive="1" Field="batchNbr" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="e00f46e9-25dc-4443-94ce-0be6a3eae9a0" />
</GITable>
<GITable Alias="ARTran" Name="PX.Objects.AR.ARTran">
<GIResult LineNbr="8" IsActive="1" Field="tranAmt" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="b90b9072-49a3-410b-a9e8-5012e3d2fdf2" />
<GIResult LineNbr="7" IsActive="1" Field="lineType" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="88cf973c-a6a7-47f0-b2d0-7fdaf20b8182" />
<GIResult LineNbr="6" IsActive="1" Field="lineNbr" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="477fd001-d096-4335-87ef-b2897149ce06" />
</GITable>
<GITable Alias="ARRegister" Name="PX.Objects.AR.ARRegister">
<GIRelation LineNbr="2" ChildTable="GLTran" IsActive="1" JoinType="I">
<GIOn LineNbr="5" ParentField="docType" Condition="E " ChildField="tranType" Operation="A" />
<GIOn LineNbr="4" ParentField="refNbr" Condition="E " ChildField="refNbr" Operation="A" />
</GIRelation>
<GIRelation LineNbr="1" ChildTable="ARTran" IsActive="1" JoinType="I">
<GIOn LineNbr="3" ParentField="released" Condition="NE" ChildField="released" Operation="A" />
<GIOn LineNbr="2" ParentField="refNbr" Condition="E " ChildField="refNbr" Operation="A" />
<GIOn LineNbr="1" ParentField="docType" Condition="E " ChildField="tranType" Operation="A" />
</GIRelation>
<GIResult LineNbr="4" IsActive="1" Field="docDate" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="192e173f-235e-4a28-8a64-189adea0df5c" />
<GIResult LineNbr="3" IsActive="1" Field="released" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="47a63a77-349f-4536-9aa4-d6e876d9147d" />
<GIResult LineNbr="2" IsActive="1" Field="refNbr" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="4e06f0f9-6d2f-4486-af51-20f17ad296dc" />
<GIResult LineNbr="1" IsActive="1" Field="docType" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="14997f39-04d5-4b74-812e-04b794c7dfbb" />
</GITable>
<GIWhere LineNbr="2" IsActive="1" DataFieldName="GLTran.debitAmt" Condition="G " IsExpression="0" Value1="0" Operation="A" />
<GIWhere LineNbr="1" IsActive="1" DataFieldName="GLTran.module" Condition="E " IsExpression="1" Value1="AR" Operation="A" />
</row>
</GIDesign>
</data>
</data-set>
Step 1: Update the Status field value, the Released flag value, and the link to the GL batch (BatchNbr) by applying the following SQL script.
AR Module
UPDATE ARRegister
SET Status = 'N',
Released = 1,
Hold = 0,
BatchNbr = <BatchNbr>
WHERE CompanyId = <CompanyId>
AND DocType = <DocType>
AND RefNbr = <RefNbr>
In the script above, replace the following:
<CompanyId> with your Company ID
<BatchNbr> with the BatchNbr returned by the diagnostic generic inquiry
<RefNbr> with the RefNbr returned by the diagnostic generic inquiry
<DocType> with the DocType returned by the diagnostic generic inquiry:
INV for an invoice
CRM for a credit memo
Unfortunately, I only have the SQL for the AR Register.
Although it is possible to make the SQL script universal so that it can update all inconsistent documents returned by the generic inquiry, we recommend that you apply it to specific documents only. This script changes sensitive data and should not be executed in other forms.
Step 2: On the Validate Customer Balance (AR509900) form, process the affected customers.
I hope this helps someone else, even if it's just to provide clarity into the issue.
I'm gonna create an Ext.Net's TreeGrid with custom nodes.
e.g :
All of TreeGrid's nodes should have a textbox at the front of itself and users should write a number at it.
See the below image :
Also, I have to get each nodes' textbox values in code behind at postback.
Could you please guide me, how I can create it with Ext.net and C# ?
Thanks.
Unfortunately, implementing these features with the current release of <ext:TreeGrid> in Ext.NET (v1.x) is annoyingly difficult. The <ext:TreeGrid> is just not setup for this type of rendering.
There's help coming in the next Ext.NET release (v2), although at this point it has not been released.
Here's a basic sample to help get you started with rendering the <input> fields.
Example
<%# Page Language="C#" %>
<%# Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>TreeGrid - Ext.NET Examples</title>
<link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var formatHours = function (v) {
if (v || v === 0) {
return "Number : <input class=\"x-form-text x-form-field\" type=\"text\" value=\"" + v + "\" />";
}
return "";
};
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:TreeGrid
ID="TreeGrid1"
runat="server"
Title="Projects"
Width="500"
Height="300"
NoLeafIcon="true"
EnableDD="true">
<Columns>
<ext:TreeGridColumn Header="Task" Width="230" DataIndex="task" />
<ext:TreeGridColumn Header="Score" Width="200" DataIndex="duration" Align="Center" SortType="AsFloat">
<XTemplate runat="server">
<Html>
{duration:this.formatHours}
</Html>
<Functions>
<ext:JFunction Name="formatHours" Fn="formatHours" />
</Functions>
</XTemplate>
</ext:TreeGridColumn>
</Columns>
<Root>
<ext:TreeNode Text="Tasks">
<Nodes>
<ext:TreeNode Icon="Folder" Expanded="true">
<CustomAttributes>
<ext:ConfigItem Name="task" Value="Project: Shopping" Mode="Value" />
</CustomAttributes>
<Nodes>
<ext:TreeNode Icon="Folder" Expanded="true">
<CustomAttributes>
<ext:ConfigItem Name="task" Value="Remodeling" Mode="Value" />
</CustomAttributes>
<Nodes>
<ext:TreeNode Icon="Folder">
<CustomAttributes>
<ext:ConfigItem Name="task" Value="Paint bedroom" Mode="Value" />
</CustomAttributes>
<Nodes>
<ext:TreeNode Leaf="true">
<CustomAttributes>
<ext:ConfigItem Name="task" Value="Ceiling" Mode="Value" />
<ext:ConfigItem Name="duration" Value="1.25" />
</CustomAttributes>
</ext:TreeNode>
<ext:TreeNode Leaf="true">
<CustomAttributes>
<ext:ConfigItem Name="task" Value="Walls" Mode="Value" />
<ext:ConfigItem Name="duration" Value="1.5" />
</CustomAttributes>
</ext:TreeNode>
</Nodes>
</ext:TreeNode>
<ext:TreeNode Leaf="true">
<CustomAttributes>
<ext:ConfigItem Name="task" Value="Decorate living room" Mode="Value" />
<ext:ConfigItem Name="duration" Value="12" />
</CustomAttributes>
</ext:TreeNode>
<ext:TreeNode Leaf="true">
<CustomAttributes>
<ext:ConfigItem Name="task" Value="Fix lights" Mode="Value" />
<ext:ConfigItem Name="duration" Value="0" />
</CustomAttributes>
</ext:TreeNode>
<ext:TreeNode Leaf="true">
<CustomAttributes>
<ext:ConfigItem Name="task" Value="Reattach screen door" Mode="Value" />
<ext:ConfigItem Name="duration" Value="142" />
</CustomAttributes>
</ext:TreeNode>
<ext:TreeNode Leaf="true">
<CustomAttributes>
<ext:ConfigItem Name="task" Value="Retile kitchen" Mode="Value" />
<ext:ConfigItem Name="duration" Value="96" />
</CustomAttributes>
</ext:TreeNode>
</Nodes>
</ext:TreeNode>
</Nodes>
</ext:TreeNode>
</Nodes>
</ext:TreeNode>
</Root>
</ext:TreeGrid>
</form>
</body>
</html>
I could found the answer :
<ext:TreeGrid ID="KnowledgeFieldsTreeGridWithTextBox1" runat="server" Title="Fileds "
Icon="Plugin" Height="300" AutoHeight="true" AutoExpandColumn="KnowledgeFiled">
<TopBar>
<ext:Toolbar ID="KnowledgeFieldsTreeGridWithTextBoxToolbar1" runat="server">
<Items>
<ext:ToolbarFill ID="KnowledgeFieldsTreeGridWithTextBoxToolbarFill1" runat="server" />
<ext:ToolbarTextItem ID="KnowledgeFieldsTreeGridWithTextBoxTextItem1" runat="server"
Text=" Filter : " />
<ext:TriggerField ID="KnowledgeFieldsTreeGridWithTextBox_TriggerField1" runat="server" EnableKeyEvents="true">
<Triggers>
<ext:FieldTrigger Icon="Clear" />
</Triggers>
<Listeners>
<KeyUp Fn="KnowledgeFieldsTreeGridWithTextBox_KeyUp" Buffer="250" />
<TriggerClick Fn="KnowledgeFieldsTreeGridWithTextBox_ClearFilter" />
</Listeners>
</ext:TriggerField>
</Items>
</ext:Toolbar>
</TopBar>
<Columns>
<ext:TreeGridColumn Header="Filed Name" DataIndex="KnowledgeFiledName" Width="100" Align="Center" />
<ext:TreeGridColumn Header="Score" DataIndex="KnowledgeScore" Width="200" Align="Right">
<XTemplate runat="server">
<Html>
<tpl if="values.leaf">
<input type="text" style="width:30px; text-align:left;" maxlength="5" value="{KnowledgeFiledScore}"></input>
</tpl>
</Html>
</XTemplate>
</ext:TreeGridColumn>
</Columns>
<Root>
</Root>
<Listeners>
<BeforeClick Handler="return !Ext.fly(e.getTarget()).is('input[type=text]');" />
</Listeners>
</ext:TreeGrid>
Background
Our email vendor supports rss feeds for dynamic content, which we use successfully for "daily headline" type emails. This is a great help in automating many different emails that we don't have staffing to create daily. One of our staff as requested that his daily email (which has recent headlines from his Movable Type blog) only have headlines from entries posted on that day.
My Question
Since we use Movable Type for his blog, is there a way to generate a rss feed that only contains items posted on the current day?
Your solution can be simplified by using the "days" parameter on mt:Entries:
<?xml version="1.0" encoding="<$MTPublishCharset$>"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><$MTBlogName remove_html="1" encode_xml="1"$></title>
<link rel="alternate" type="text/html" href="<$MTBlogURL encode_xml="1"$>" />
<link rel="self" type="application/atom+xml" href="<$MTBlogURL$>atom.xml" />
<id>tag:<$MTBlogHost exclude_port="1" encode_xml="1"$>,<$MTDate format="%Y"$>:<$MTBlogRelativeURL encode_xml="1"$>/<$MTBlogID$></id>
<link rel="service.post" type="application/atom+xml" href="<$MTCGIPath$><$MTAtomScript$>/weblog/blog_id=<$MTBlogID$>" title="<$MTBlogName encode_html="1"$>" />
<updated><MTEntries lastn="1"><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></MTEntries></updated>
<MTIfNonEmpty tag="MTBlogDescription"><subtitle><$MTBlogDescription remove_html="1" encode_xml="1"$></subtitle></MTIfNonEmpty>
<generator uri="http://www.sixapart.com/movabletype/">Movable Type <$MTVersion$></generator>
<MTEntries days="1">
<entry>
<title><$MTEntryTitle remove_html="1" encode_xml="1"$></title>
<link rel="alternate" type="text/html" href="<$MTEntryPermalink encode_xml="1"$>" />
<link rel="service.edit" type="application/atom+xml" href="<$MTCGIPath$><$MTAtomScript$>/weblog/blog_id=<$MTBlogID$>/entry_id=<$MTEntryID$>" title="<$MTEntryTitle encode_html="1"$>" />
<id><$MTEntryAtomID$></id>
<published><$MTEntryDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></published>
<updated><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></updated>
<summary><$MTEntryExcerpt remove_html="1" encode_xml="1"$></summary>
<author>
<name><$MTEntryAuthorDisplayName encode_xml="1"$></name>
<MTIfNonEmpty tag="MTEntryAuthorURL"><uri><$MTEntryAuthorURL encode_xml="1"$></uri></MTIfNonEmpty>
</author>
<MTEntryCategories>
<category term="<$MTCategoryLabel encode_xml="1"$>" />
</MTEntryCategories>
<content type="html" xml:lang="<$MTBlogLanguage ietf="1"$>" xml:base="<$MTBlogURL encode_xml="1"$>">
<$MTEntryBody encode_xml="1"$>
<$MTEntryMore encode_xml="1"$>
</content>
</entry>
</MTEntries>
No need for checking the date yourself, this also removes the empty "entry" tags your version creates.
Okay, so i figured it out myself.
First I had to create a new feed, which i named "daily.xml" and copied the default code from atom.xml into it. Then I used setvarblock to define variables for the current date and publish date. Once this was done I used if to compare the 2 variables, and show the ones that matched.
code:
<?xml version="1.0" encoding="<$MTPublishCharset$>"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><$MTBlogName remove_html="1" encode_xml="1"$></title>
<link rel="alternate" type="text/html" href="<$MTBlogURL encode_xml="1"$>" />
<link rel="self" type="application/atom+xml" href="<$MTBlogURL$>atom.xml" />
<id>tag:<$MTBlogHost exclude_port="1" encode_xml="1"$>,<$MTDate format="%Y"$>:<$MTBlogRelativeURL encode_xml="1"$>/<$MTBlogID$></id>
<link rel="service.post" type="application/atom+xml" href="<$MTCGIPath$><$MTAtomScript$>/weblog/blog_id=<$MTBlogID$>" title="<$MTBlogName encode_html="1"$>" />
<updated><MTEntries lastn="1"><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></MTEntries></updated>
<MTIfNonEmpty tag="MTBlogDescription"><subtitle><$MTBlogDescription remove_html="1" encode_xml="1"$></subtitle></MTIfNonEmpty>
<generator uri="http://www.sixapart.com/movabletype/">Movable Type <$MTVersion$></generator>
<MTEntries lastn="15">
<entry>
<!-- this sets the current date to a variable named "TodaysDate" -->
<mt:setvarblock name="TodayDate"><$mt:Date format="%Y%m%d"></mt:setvarblock>
<!-- this sets the entry publish date to a variable named "PublishedDate" -->
<mt:setvarblock name="PublishedDate"><$mt:EntryDate format="%Y%m%d"></mt:setvarblock>
<!-- starts an IF statement comparing equality of "PublishedDate" and "TodayDate". note: for some reason the second variable needs to have an '$' added to the front -->
<mt:if name="PublishedDate" eq="$TodayDate">
<!-- the rest of this (except the end of the IF statement) is copied from default template -->
<title><$MTEntryTitle remove_html="1" encode_xml="1"$></title>
<link rel="alternate" type="text/html" href="<$MTEntryPermalink encode_xml="1"$>" />
<link rel="service.edit" type="application/atom+xml" href="<$MTCGIPath$><$MTAtomScript$>/weblog/blog_id=<$MTBlogID$>/entry_id=<$MTEntryID$>" title="<$MTEntryTitle encode_html="1"$>" />
<id><$MTEntryAtomID$></id>
<published><$MTEntryDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></published>
<updated><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></updated>
<summary><$MTEntryExcerpt remove_html="1" encode_xml="1"$></summary>
<author>
<name><$MTEntryAuthorDisplayName encode_xml="1"$></name>
<MTIfNonEmpty tag="MTEntryAuthorURL"><uri><$MTEntryAuthorURL encode_xml="1"$></uri></MTIfNonEmpty>
</author>
<MTEntryCategories>
<category term="<$MTCategoryLabel encode_xml="1"$>" />
</MTEntryCategories>
<content type="html" xml:lang="<$MTBlogLanguage ietf="1"$>" xml:base="<$MTBlogURL encode_xml="1"$>">
<$MTEntryBody encode_xml="1"$>
<$MTEntryMore encode_xml="1"$>
</content>
<!-- end of our IF statement -->
</mt:if>
</entry>
</MTEntries>
</feed>