Skip to main content
I have 2 smart objects - one representing a project and the other representing line items in that project, i.e. there's a 1 to many relationship between them. I need to send out an email with a summary of the project and I'm finding this a very complicated procedure.

I can add the properties of the project smart object easily enough, but is there a way of adding details of multiple smart objects and formatting them decently? At the moment if I add in anything from a smart object's "GetList" method rather than the "Load" method then it all gets concatinated into one long unreadable string.

Any ideas? I'm sure many people would want to do this...

Trentino

I've been trying to work out how to do something similar so I took an odd approach to get round it.


What you do is create a client code event (before you need to use it), call the SmartObject in the code using the SourceCode API,


loop through each item retrieved in the getlist return, creating an HTML table on the fly (as a big long string)


store the result of the string in a datafield where you can get at it for the email.


drop the datafield containing the html table onto your mail event activity body..


seems to work for me... but it's not exactly elegant code :-)


Martin


Thanks Martin. I've been doing the same thing actually. I'm quite surprised that it's such a workaround though, I'd have thought it would be a common use.

Thanks for the confirmation on my 'hack'

;)

Reply