Skip to main content

Hi,

I added the user defied field (UsrFlag) in the POLine table, I've extended the Endpoint to add the custom field. How I can pass the user defied field to the PurchaseOrderDetail class using the Custom property?

 

Thanks,

Ev

@edsonvelez64 - You should be able to see this new field you added (UsrFlag) by just extending the existing Endpoint (Default) to your own named endpoint.  Once this is done you can “Extend Entity” and then click “Populate” to find your POLine field (UsrFlag).  See my screenshot

 

 


Hi @edsonvelez64,

This link will also help you to pass custom field to endpoint.

Regards,

Sweta

 


This link will also help you to pass custom field to endpoint

I believe that link is referencing true UDFs and if I'm not mistaken, the OP is calling a custom field a 'user defined field'.


@edsonvelez64,

Adding to @StevenRatner points, as the Custom field is in POLine, it would be right to add the custom field to the Details level than the header level. Below is the screenshot of the option you can try,

 

 

After mapping and saving the extended endpoint, you can do a GET request and expand Details to fetch the custom field along the Detail Lines. Feel free to share more details if you have any questions, Good Luck.!  


Hi,

Thanks all. 

I mean how to pass these new fields to the endpoint. But I managed to send them this way.

 

var customFields = new Dictionary<string, CustomField>
{
{ "UsrFlag", new CustomIntField { Value = 0 } }

};

Document.Details.Add(new PurchaseOrderDetail
{
WarehouseID = siteId,
InventoryID = "",
OrderQty = 0m,
Requested = DateTime.Now,
UnitCost = 0m,
UOM = "",
Note = "",
Custom = new Dictionary<string, Dictionary<string, CustomField>> { { "Transactions", customFields } },
OrderType = "RO"
});

 

 


Reply