Skip to content

Commit fa6dd6c

Browse files
authored
Update README.md
1 parent 86d629a commit fa6dd6c

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ WebApiClient.Create(request)
3333
```
3434

3535
### Retrieve
36-
The client supports retrieving of records by Id or also retrieve multiple.
36+
The client supports retrieving of records by Id, by alternate key and retrieve multiple.
37+
For retrieving by alternate key, pass an array of objects that each have a property and a value property.
3738
You have to pass at least the entity logical name.
3839
You can always pass query parameters which will be appended to your retrieve requests.
3940

@@ -54,6 +55,27 @@ WebApiClient.Retrieve(request)
5455
});
5556
```
5657

58+
Retrieve by alternate key:
59+
60+
```JavaScript
61+
var request = {
62+
entityName: "contact",
63+
alternateKey:
64+
[
65+
{ property: "firstname", value: "Joe" },
66+
{ property: "emailaddress1", value: "[email protected]"}
67+
]
68+
};
69+
70+
WebApiClient.Retrieve(request)
71+
.then(function(response){
72+
// Process response
73+
})
74+
.catch(function(error) {
75+
// Handle error
76+
});
77+
```
78+
5779
Retrieve Multiple:
5880

5981
```JavaScript

0 commit comments

Comments
 (0)