Running into an issue trying to set the Transferred to: field on a Ledger Transfer (-).
I can not set this field directly, it requires creating a LedgerTransferIn transaction and posting it to the destination ledger, however I do not want it to automatically post with out the user, so I can't go that route.
I tried setting the FeeTransferLedger on the associated contact, and this populates correctly when the user updates the status to "Posted", and this seems to work for all contacts EXCEPT Buyer & Seller. In fact, for buyer and seller, FeeTransferLedger isn't even available in the UI, and looking at permissions reveals that permissions do not even exist for this field on buyer/seller let alone be editable. Trying to set this field via code throws a read-only exception.
So my question is, for a Buyer or Seller contact specifically, how do I automatically populate the Transferred To field on the Ledger Transfer (-) UI, while still letting the UI/Base framework handle actually creating & posting the transaction when the user clicks OK.
I understand a picture may help clarify what I am talking about, so I've Emailed Bob Richards a screen shot (Since uploading pictures on the forum does not work).
Set LedgerTransferIn on a LedgerTransferOut
Re: Set LedgerTransferIn on a LedgerTransferOut
The FeeTransferLedger field is not available via UI on the buyer/seller screen. You should be able to set it via API. Make sure you have the below permissions
Permissions.ProForm,Order.General.OrderContacts.BuyerSeller.Add and Permissions.General.OrderContacts.BuyerSeller.Edit
Permissions.ProForm.Order.General.OrderContacts.OutgoingWireInformation.Edit
Permissions.ProForm,Order.General.OrderContacts.BuyerSeller.Add and Permissions.General.OrderContacts.BuyerSeller.Edit
Permissions.ProForm.Order.General.OrderContacts.OutgoingWireInformation.Edit
Re: Set LedgerTransferIn on a LedgerTransferOut
I did as you suggested and made sure I had full permissions.
I still cannot set FeeTransferLedger via the API, it is read-only.
I've attempted grabbing the contact from the transaction and setting it as below:
I've also tried getting the contact through the order object instead, but that version doesn't even have FeeTransferLedger as an available field.
I still cannot set FeeTransferLedger via the API, it is read-only.
I've attempted grabbing the contact from the transaction and setting it as below:
Code: Select all
var contactId = new Guid(transaction.Tags.FirstOrDefault(x => x.Name == "OrderContactID")?.Value ?? Guid.Empty.ToString());
var orderContact = t.ExtendedProperties
.Where(p => p.Name == "OrderInformation")
.Select(x => (IOrderInformation)x.Value)
.SelectMany(c => c.Contacts)
.FirstOrDefault(x => x.ID == contactId);
//Read only exception on this line
orderContact.FeeTransferLedger = ledgerTransferInName;
Re: Set LedgerTransferIn on a LedgerTransferOut
If possible we would rather not set the Fee Ledger for the Buyer/Seller (but if this is the only way, we can work with it for now).
Ideally we want to intercept the Posting process and set the Ledger ID for the Ledger Transfer in the UI at that time.
Ideally we want to intercept the Posting process and set the Ledger ID for the Ledger Transfer in the UI at that time.
Re: Set LedgerTransferIn on a LedgerTransferOut
FeeTransferLedger is on the PaymentInfo object.
Once you get the Contact, you can set the its value
[contact].PaymentInfo.FeeTransferLedger = “FeeLedgerName”
Once you get the Contact, you can set the its value
[contact].PaymentInfo.FeeTransferLedger = “FeeLedgerName”
Re: Set LedgerTransferIn on a LedgerTransferOut
Thank you, that works.