I'm trying to get customer.location and customer.location.site but don't work: var cloc="$args.customer.location"; var csit="$args.customer.location.site";
Thanks for the help
not sure how/where you did this but out of box there are
many htmpl files that reference $args.customer. For example,
detail_pr.htmpl has this kind of statements there:
var old_end_user = "$args.customer";
<input type="hidden" name="SET.customer" value="$args.customer">
<input type="hidden" name="customer_combo_name" value="$args.customer.combo_name">
<PDM_MACRO name=button caption="Re Auto Assign" func="re_auto_assign('$args.assignee','$args.group','$args.customer','$a
name="Re Auto Assign" id=btn010>
<PDM_MACRO name=button caption="Quick Profile[Q]" func="profile_browser('$args.customer.persistent_id',void(0),void(0),'
$args.persistent_id')" hotkey_name="Quick Profile[Q]" id=PROFILE_BROWSER>
<input type="hidden" name="user_contract" value="$args.customer.organization.owning_contract">
<input type="hidden" name="org_id" value="$args.customer.organization.id">
I added these two lines to the loadActions():
myvar = "$args.customer.location";
and I did see the customer location uuid displayed.
will help if you give us a little more context
Thanks for the answer
I need to use the customer's location and site in order to fill another field when the tickets is created
When you're opening the ticket, there is no $args.customer, not before you save it for the first time. You'll have to dig the customer UUID from the form and do the search based on that. This might get a bit tricky so can you get away with doing this with a SPEL trigger when the ticket is saved?
Please review this thread:
MULTIPLE INDIRECT REFERENCES ON SEARCHES
and vote up the Idea because every single client I've had that is large enough to use Locations and Sites, needs this ability. It should not be custom code, in my opinion.
I agree, that functionality would be nice to have but as far as I can tell it is not related to this issue, here the issue is reading the value on a detail view instead of sorting by it in a list view.
Retrieving data ...