R39281 Offers - Set Customer From To Party
| Code | R39281 |
| Entity | Crm.Presales.Offers Entity |
| Name | SetCustomerFromToParty |
| Attribute | Customer |
| Layer | Back-End |
| Events | Releasing + |
| Priority | Normal |
| Modify | YES |
| Action | If (Customer == NULL) && (ToParty != NULL): Search for an existing Customer record where: • Customer.Party == Offer.ToParty • Customer.IsActive == TRUE • Customer.EnterpriseCompany == Offer.EnterpriseCompany OR Customer.EnterpriseCompany == NULL • Customer.FromDate == NULL OR Customer.FromDate <= Offer.DocumentDate • Customer.ThruDate == NULL OR Customer.ThruDate >= Offer.DocumentDate If a matching Customer is found: • Set the first found Customer to the Offer's Customer field. Else: • Create a new Customer record where: • Customer.Party == Offer.ToParty • Customer.FromDate = TODAY • Customer.EnterpriseCompany = Offer.EnterpriseCompany • Customer.DefaultCurrency = Offer.EnterpriseCompany.BaseCurrency • Customer.CreditLimit = Offer.EnterpriseCompany.DefaultCustomerCreditLimitBase • Customer.IsActive = TRUE • Customer.AllowUseAsPrimaryCustomer = TRUE • Customer.AllowUseAsShipToCustomer = FALSE • Other customer fields are set to NULL or to their default values • Then set the new Customer to the Offer's Customer field |
| Description | The rule checks for an existing valid Customer record based on the Offer’s ToParty and
EnterpriseCompany when an Offer is approved (system state set to Released or higher). If there is an existing valid Customer record, it is assigned to the Offer. If no such record is found, a new Customer is created and then assigned to the Offer. This eliminates the need for manual customer assignment or creation by the user. |
| Message | - |
| Version | Introduced: v.26.2 |
| Revocable | NO |
* For more information about the Business Rules Documentation Template and a short explanation of each column, see
topic System Business Rules.