Below is an excerpt of my script attempt to clear the customer entries (Bill To, Ship To, End User) on a quote. (For the rest, just replace "BillTo" with "ShipTo" and then with "EndUser")
Not only does this seem unnecessarily long, but the fields don't stay cleared - they are re-populated with the original info. It seems like a contact in the address book is selected, and clearing all these fields without resetting the selected contact doesn't actually do anything.
How do I remove the 3 customer selections on a quote? I'm hoping for something like "Quote.BillToCustomer = None"...
Quote.BillToCustomer.Active = False Quote.BillToCustomer.Address1 = '' Quote.BillToCustomer.Address2 = '' Quote.BillToCustomer.BusinessFax = '' Quote.BillToCustomer.BusinessPhone = '' Quote.BillToCustomer.City = '' Quote.BillToCustomer.CompanyName = '' Quote.BillToCustomer.CountryAbbreviation = '' Quote.BillToCustomer.CrmAccountId = '' Quote.BillToCustomer.CrmContactId = '' Quote.BillToCustomer.CustomerCode = '' Quote.BillToCustomer.CustomerType = '' Quote.BillToCustomer.Email = '' Quote.BillToCustomer.FirstName = '' Quote.BillToCustomer.LastName = '' Quote.BillToCustomer.OwnerName = '' Quote.BillToCustomer.PrimaryIndustry = '' Quote.BillToCustomer.Province = '' Quote.BillToCustomer.QuoteId = int() Quote.BillToCustomer.StateAbbreviation = '' Quote.BillToCustomer.TerritoryName = '' Quote.BillToCustomer.Title = '' Quote.BillToCustomer.UserId = int() Quote.BillToCustomer.ZipCode = ''