Skip to content

Commit cd7f73c

Browse files
fix #30
1 parent 4a91637 commit cd7f73c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/dynamics-web-api-callbacks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ function DynamicsWebApi(config) {
796796
}
797797

798798
//add page number and paging cookie to fetch xml
799-
fetchXml = fetchXml.replace(/^(<fetch[\w\d\s'"=]+)/, replacementString);
799+
fetchXml = fetchXml.replace(/^(<fetch)/, replacementString);
800800

801801
var request = {
802802
collection: collection,

lib/dynamics-web-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ function DynamicsWebApi(config) {
730730
}
731731

732732
//add page number and paging cookie to fetch xml
733-
fetchXml = fetchXml.replace(/^(<fetch[\w\d\s'"=]+)/, replacementString);
733+
fetchXml = fetchXml.replace(/^(<fetch)/, replacementString);
734734

735735
var request = {
736736
collection: collection,

tests/stubs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,21 +147,21 @@ var dataStubs = {
147147
'</entity>' +
148148
'</fetch>',
149149
fetchXml1:
150-
'<fetch mapping="logical" count="5" page="1">' +
150+
'<fetch page="1" mapping="logical" count="5">' +
151151
'<entity name="account">' +
152152
'<attribute name="accountid"/>' +
153153
'<attribute name="name"/>' +
154154
'</entity>' +
155155
'</fetch>',
156156
fetchXml2cookie:
157-
'<fetch mapping="logical" count="5" page="2" paging-cookie="&lt;cookie page=&quot;1&quot;&gt;&lt;accountid last=&quot;{EF72AE29-B3DE-E611-8102-5065F38A7BF1}&quot; first=&quot;{475B158C-541C-E511-80D3-3863BB347BA8}&quot; /&gt;&lt;/cookie&gt;">' +
157+
'<fetch page="2" paging-cookie="&lt;cookie page=&quot;1&quot;&gt;&lt;accountid last=&quot;{EF72AE29-B3DE-E611-8102-5065F38A7BF1}&quot; first=&quot;{475B158C-541C-E511-80D3-3863BB347BA8}&quot; /&gt;&lt;/cookie&gt;" mapping="logical" count="5">' +
158158
'<entity name="account">' +
159159
'<attribute name="accountid"/>' +
160160
'<attribute name="name"/>' +
161161
'</entity>' +
162162
'</fetch>',
163163
fetchXml2:
164-
'<fetch mapping="logical" count="5" page="2">' +
164+
'<fetch page="2" mapping="logical" count="5">' +
165165
'<entity name="account">' +
166166
'<attribute name="accountid"/>' +
167167
'<attribute name="name"/>' +

0 commit comments

Comments
 (0)