Hi All,
I've been searching for the right answer for this, but haven't really been able to find anything. I've got a few scenarios where I need to set default values on entity forms, but haven't been able to find something for my use case:
I have a lookup field in the account entity for Payment terms. It's a lookup to the "Payment Term" entity from field service. The payment term entity has a name, and a days field (Where you specify the amount of days a customer has to pay an invoice.
Then, in the Business Unit entity, I created a new lookup field which I called "new_DefaultPaymentTerm" with one of the payment terms from the paymentterm entity selected. The idea is to enter that default payment term specified in the business unit, into the payment term lookup field when i create a new account.
So scenario 1 is: On new account creation, get the default payment term from the business unit of the current user, and select that as the value for Payment Term for the new Account.
Scenario 2 : User creates a new invoice. On Account selection, the payment term is looked up from the account entity, and selected in the PaymentTerm field, also a lookup field on the payment term entity. Then the Days field value (which will be something like 30) is retrieved from the paymentterm entity record selected in the invoice, and the Due date is updated with Today + <paymentterm days> value.
I've seen a lot of reference to Javascript, actions, workflows, business process flows, but I'm not really getting a good answer. Is this possible at all? Has anyone done this before? Can anyone point me in the right direction?
Thanks!