I am trying to create Bill with ‘Owner’ field via such request
{
"WorkgroupID": {
"value": "AP Processors"
},
"PaymentMethod": {
"value": "FEDW-IRE"
},
"Vendor": {
"value": "ASIV1yuotu0137"
},
"Company": {
"value": " Energy"
},
"OwnerContact": {
"value": "Diane Lehr"
},
"PostPeriod": {
"value": "08-2023"
},
"Branch": {
"value": "6400"
},
"BranchID": {
"value": "6400"
},
"Type": {
"value": "Bill"
},
"Owner": {
"value": 18897
},
"VendorRef": {
"value": "1135244"
},
"AccrualAmount": {
"value": "18,561.64"
},
"Date": {
"value": "05/29/2022"
}
}
I want to pass to Owner definite value
but it’s type is int
How to get this value for specific Contact name and pass it correctly for new Bill entity?
Page 1 / 1
Hi @Ivan ,
You should pass the ID for this owner field. Refer to the screenshot below.
@Ivan
Not sure whats the root cause but here’s how I was able to add owner information during Bill creation using API:
Extend endpoint to include Financial > Owner fields:
Make a PUT request utilizing newly available Financial tab:
Review the results in UI:
If you still getting the issues/error, I would suggest to create a Bill in UI with the same data to make sure it is not a setup/data issue.
Hopefully it helps
I want to pass to Owner definite value
but it’s type is int
How to get this value for specific Contact name and pass it correctly for new Bill entity?
@jinin - I believe he already knows the issue, but he’s asking how to find the ID.
I want to pass to Owner definite value
but it’s type is int
How to get this value for specific Contact name and pass it correctly for new Bill entity?
@jinin - I believe he already knows the issue, but he’s asking how to find the ID.
@darylbowman , I see. @Ivan further investigation reveals that this information is coming from PX.Objects.CR.CREmployee DAC which you could access utilizing ODatav4 like:
I want to pass to Owner definite value
but it’s type is int
How to get this value for specific Contact name and pass it correctly for new Bill entity?
@jinin - I believe he already knows the issue, but he’s asking how to find the ID.
@darylbowman , I see. @Ivan further investigation reveals that this information is coming from PX.Objects.CR.CREmployee DAC which you could access utilizing ODatav4 like:
Hi @RohitRattan88
Ho to make request to this entity : “PX.Objects.CR.CREmployee” ?
I want to pass to Owner definite value
but it’s type is int
How to get this value for specific Contact name and pass it correctly for new Bill entity?
@jinin - I believe he already knows the issue, but he’s asking how to find the ID.
Hi @darylbowman
Yes, exactly, the question is how to find the ID
@Ivan - The image Rohit posted has the parameters needed. It’s filtering on AcctName, using ‘Maxwell Baker’ as an example.
@Ivan - The image Rohit posted has the parameters needed. It’s filtering on AcctName, using ‘Maxwell Baker’ as an example.
I did not understand how we make request to PX_Objects_CR_CREmployee entity
I never worked with odatav4
For getting bills such request will be successful
How to do same for PX_Objects_CR_CREmployee as @RohitRattan88 showed ?
Ah, I didn’t catch that the base URL he is using is different. I believe you should be able to use the web service endpoint to query the Employees table and filter by EmployeeName. From there, drill down to ContactInfo and ContactID should be the value you need.
How to do same for PX_Objects_CR_CREmployee as @RohitRattan88 showed ?
@Ivan , I did not find this DAC mapped on any screen, hence suggested using ODatav4 for direct DAC query. Alternatively, you could create a GI for this DAC and use this GI for your API calls.
Ah, I didn’t catch that the base URL he is using is different. I believe you should be able to use the web service endpoint to query the Employees table and filter by EmployeeName. From there, drill down to ContactInfo and ContactID should be the value you need.
How to drill down to ContactInfo ? How to form request to that ?
The REST api is not my strong suite. Perhaps @RohitRattan88 could assist?
@darylbowman
The problem is that ContactInfo does not contain ContactID,
I checked endpoint
Unfortunately this approach did not work
@Ivan as mentioned before, if you ContactID field does not seem to be mapped hence not available.
If you wanna use Contract Based REST API to access contactID of an Employee, you could create a GI and map it to your endpoint and access via API from there.