How to get the email from a user / agent from a custom lookup field - zendesk

We have a custom field with a type lookup in Zendesk connected to a form. Which gives us the possiblity to add another user object to a ticket.
But I am not able to figure out how to get that email address from that field in the ticket.
The documentation describes that if you select a relation you get a agent or user object. By getting this object, you can address the fields for that object.
But this is not working for us.
For example, the field ID 11963774080017
So to address the name in the field, we use {{ticket.ticket_field_11963774080017}}.
But when using the following {{ticket.ticket_field_11963774080017.user.email}}.
I am not able to fetch the user email.
Many thanks.

Related

Adding Dynamic Link to Custom Field

I'm new to Netsuite Suitescript.
I have created a custom field which stores the sales order on the purchase Order. I am trying to make the field dynamic so when user clicks on it, it will take you to the Sales order
There is a standard NetSuite field at the Purchase Order level named "Created From". It is repopulated with the Sales Order # if a Purchase Order is created from a Sales Order. If this field is not sufficient, ensure the field you created is type = List/Record and stores a value. If you cannot store a value, please share more details on the custom field you created (type, defaulting, sourcing, filtering, etc.).
080421 addition:
I see. I can think of 3 ways to address this. (1) update the mechanism that creates POs, if it's a script instead of record.create use record.transform. This will populate the native NS field going forward. (2) create a custom transaction body field that will list the Sales Order Transaction record. Then you will have to set this value manually, or via script. or (3) update existing field to house the internal id of the SO, and create a custom transaction body field that is a hyperlink that has a default value as: 'https://XXXX.app.netsuite.com/app/accounting/transactions/salesord.nl?&id='||{fieldIdContainingSOInternalId}

Microsoft Graph User last modified field

I am trying to filter the Users endpoint by a date modified field.
I tried lastModifiedDateTime ge 2020-01-01T00:00:00Z however it throws an error "Property 'lastModifiedDateTime' does not exist as a declared property or extension property."
There are no datetime fields that resembles the last modified date (i.e. a User record is updated).
Is there a last modified field for Users endpoint of Microsoft Graph that should be enabled somewhere first? Am I missing a step?
There is no lastModifiedDateTime or similar property in MS Graph.
But If your scenario is about on-premises AD data(user object) is sync to Azure AD then there is a possibility.We can get user modified /updated field changes from onPremisesLastSyncDateTime property.
Also, If you want the last password change for the user then you can query with lastPasswordChangeDateTime.

Rails Access Object Attribute

How would I access a models attribute?
For example, the User model. Let's say I want to access the email portion of the User object.
It does not seem I am able to do
User.email
To access the email of the user.
I was wondering how I would access object attributes in the model and controller.
To get email for all User records, you can do
User.pluck(:email)
If you want to get email a particular user object, you can do
User.find(1).email
Where 1 being the id of the user object in the users table.
I suggest you to read about ActiveRecord query interface to understand better.

Creating new user with Valence API and setting profile data

I'm successfully creating a new user using the valence API, setting the password and enrolling the new user into appropriate OUs.
(I've used the API reference at: http://docs.valence.desire2learn.com/reference.html)
I'm logged on using an account created for the application accessing the REST API.
I also want to set some of the profile fields for the new user;
I think I need to use the put profile function:
PUT /d2l/api/lp/(D2LVERSION: version)/profile/(D2LID: profileId)
My issue is how to find the profile id for the user i've just created.
It isn't returned in the user data for the created user and I can't see the API call which would let me retrieve the profile id of the newly created user.
Can anyone point me in the right direction?
Cheers
Alan
After creating a user you will have its user ID. If you make the following call (documentation)
GET /d2l/api/lp/(D2LVERSION: version)/enrollments/orgUnits/(D2LID: orgUnitId)/users/
You will get a list of all users enrolled in the provided org unit. Note that the result set of this call is paged (see the docs.) Each entry in the result is a Enrollment.OrgUnitUser, which contains a property "user" with a User.User value - which contains the users profile identifier.
You can skip ahead to the user you want by setting the bookmark value to the users userID. See the note in the green box in the documentation for the call for more information.
You can always use the root org for the orgUnitID parameter.

Name on Check in QuickBooks SDK

I have a customer requirement to export the checks written in QuickBooks into a specific format because their bank allows fraud prevention by uploading a file and they verify the name on the check against what you give them before clearing it.
I looked at the QuickBooks SDK (we use the XML to communicate in general) and It references a field on the check called PayeeEntityRef with a FullName property, but typically in QuickBooks that data structure would indicate what the entity is called, not what appears on the check (Vendors have a NameOnCheck property, for example, which can be something other than their name).
Without coding up multiple test cases to demonstrate QuickBooks behavior here, does anyone have experience with getting the name as it was printed on the check? What is the best way to do it?
It's somewhat possible to get what you are wanting, but there are going to be some hiccups that you'll need to let you client know about. The main problem being that there's no way to retrieve the actual name printed on the check.
You would first need to query for the Checks/Bill Payment - Checks for the bank account. Then, using the PayeeEntityRef (I would use the ListID component) figure out which "List" the entity is on; Customer, Vendor, Employee, or Other. I don't know of any way to tell which list the PayeeEntityRef is from other than doing a query for each of the lists.
If the PayeeEntityRef is a Vendor or Employee, then you can retrieve the NameOnCheck value. The only thing you would need to keep in mind is that if the NameOnCheck has been modified AFTER the check was printed, the names will not match.
If the PayeeEntityRef is a Customer or Other name, then you have to do a little bit more. The value that QuickBooks uses for the printed name is based on what fields are filled out for the customer record. It first will use the CompanyName field if it is not null. Next, it will try to use the First/Middle/LastName fields, if they are not null. Finally, it will use the Name field as a last resort. Keep in mind that this is not the FullName field, just the Name field.
I haven't tested this with an "Other" name, as I have my clients try not to use that list, but I would imagine it's similar to how Customers work.

Resources