This is a continuation of a question on Related fields Corey provided assistance on earlier. I have now had the opportunity to implement the example based on Corey's helpful suggestion. I am creating an Order Header and have created a related field 'Address' which has allowed me to display and use the value of a related field called 'Address' in the 'Customer' object. The first problem with this is that the address does not seem to be visible until you save the record (unless I have missed an option). It also 'stays related'. So if I go back to my Customer record and change the address the address on the order header record also changes. There may be applications where this is good functionality but for the majority of the time it is not what would be required. If, for example, I look back at my orders in a years time I would not want to see my customer's latest address on the order header. I would want to see the address as it was at the time the order was placed. Also it is important that the value b
........ the manual states that "Related fields can be used to edit the data of Related record if the following conditions are met....."
........ this is not what I am suggesting (hope my explanation above is not too confusing!).
Maybe the use of triggers after a record is saved would be a workaround for this?
e.g. in my example could I write a trigger after saving an order header record which went and fetched the address from customer record and applied it to the order header record... without a subsequent change of address on the customer record affecting the address already stored on the order record ?
Thanks.
Mr. Walsh,
a little after I awoke this morning, without having viewed your most recent response, your exact suggestion popped into my head! In the simplest case:
Object1:
FieldA
FieldB
Related Record
Object2:
FieldA
FieldB
An Object1 record has two fields which must contain a copied value of two fields from an Object2 record. In order for this to happen, a trigger should be implemented. The fields of Object1 could be read only, therefore reserving the value of these fields for this one specific use.
The most basic trigger options are as follows:
Trigger Timing - After Update
- After Create
General Properties
--On Field Change - Related Record
This would ensure that the fields are copied over whenever an Object1 record is created, or whenever the Related Record field changes. The 'Trigger Condition Formula' should work exactly as we expect. Using the rbv_api.getFieldValue and rbv_api.setFieldValue (found on page 182 and 184, respectively, on our official
Hello Corey
As usual... thank you . I'm away for a few days near London with Lynda (my wife and business partner). We're visiting a son Eamon and so won't be allowed near a computer till Monday. However I have my phone and I'm in Nero's having a coffee.
I will try your suggestion as soon as I get home.
On thinking about it a little further I realised that 'under the bonnet' the facility is 80% in place already.
If, say , you are creating an order header and press the select button to bring up a list of customers. You then pick one of those customers and the selection list disappears and immediately the customer name (record name) appears on the order record before you enter any other fields or save the order record .
What I would like (and believe is generally needed) is for other fields (optionally ) to be brought through at the same time and he values to appear immediately .
Then they should no longer be related to the source record.
I can easily send you a screen video of this functionality working if thi
Hello Mr. Walsh,
you're very welcome; always a pleasure to assist you. I'd definitely appreciate a video to best understand your description. No rush, reply at your convenience. Enjoy your time away and give Lynda and Eamon my best regards!
Corey Prak
Hello Corey
I now have a short video to describe the facility.
Is there an email address I can send it to, or to which I can send a dropbox link?
My own e-mail is richardwalsh@it-atwork.co.uk.
Thanks,
Richard.......... and thanks for regards sent to Lynda and Eamon.
Mr. Walsh,
You're very welcome for the regards! Please feel free to send the files to cprak@progress.com. I could also send you an initial email to which you could reply to with the file(s).
Thank You,
Corey
Hi Corey
If there is any update please let me know. I have come to realise just how much I use this type of functionality when building an application.
Have a good weekend.
Richard
Hello Mr. Walsh,
just wanted to acknowledge that I received your message and will reply with an update before the end of the day. Hope all is well!
Thanks,
Corey Prak
Mr. Walsh,
I believe I've been able to describe this functionality in Rollbase:
*Objects*
-Contact
----Name
----Number
-List
-Selected Contact
----Name
----Number
-Contact for List
----Name
----Number
*Relationships*
ListContact for List (many to many)
ListContact (one to one)
Now I will describe a scenario that would perform as we intended:
- From a List Record's View, select a Contact record for the Selected Contact field. After selection, the List Record's Name and and Number field will have values which are copied from the Contact Record. Note that the fields of the List record are local copies. and can be changed.
- Once manipulation is complete, a button should be pressed. This press will launch a trigger which will create a Contact for List record, copy the field values from the List record to the new Contact for List record's fields accordingly, and establish a relationship between this newly created record and the current List that is in view. Alterna
Many thanks Corey
I'll work on this in the next couple of days and see if I can get it all to work.
............ I'll let you know!
Thanks again
Richard
Mr. Walsh,
you're very welcome. Do let me know if there any bumps along the way or if you'd like me to explain anything.
Thanks,
Corey Prak
These scenarios are called 'slowly changing dimensions' in the data modeling world. Have a look at this for a long, but complete description of all the different possible scenarios (or here for a simpler explanation). I am curious to know how Salesforce.com, Netsuite or others handle these. Anyone know?
Thanks Bob
.... just back after doing other work. I'll have a good look at both links you have given for a theoretical background to my posting. When I think back at the applications I have written over a long period they have this functionality extensively.