0

I'm using the Message module, and I have some message types. Each message type needs to have a node reference field on it whose value would not change for the entire message type. But different values per message type.

Right now I can create a new message type with a field on it, but the instances of messages are generated programmatically on demand as sent.

What I ultimately need to do is generate a token based on the value of this field.

So how would I go about creating a value that would be inherited by all instances of a message type? Ideas?

Any advice useful. Sort of don't know what functions would be useful here and the docs really don't address this use case.

1 Answer 1

0

I didn't actually figure this out. I probably could have by looking at the way commerce orders get attached via entity reference to messages and done that. Instead, I used the commerce order that was attached to the message, which had the commerce store ID, to load the field on the organic group that was referencing the store and then add that field as a token.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.