Use of 'messageListVisibility' in Gmail API - gmail-api

I was trying to filter mails based on the 'messageListVisibility' field of the labels assigned to the email. To be precise, I scan the labels of each email and if any of the labels has the messageListVisibility set to "hide", I don't show the email. This didn't work, so when I had a look at the labels returned by a call to "Users.labels: list", which retrieves all labels, I observed several things:
The INBOX label has messageListVisibility = "hide"???
The label "IMPORTANT" has messageListVisibility = "hide"???
Several system labels do not have a messageListVisibility field.
The last point is manageable, but the two others are a bit surprising. Am I correct in assuming that the messageListVisibility field's objective is to not show the user any email that has that label?

You seem to be misunderstanding the purpose of the messageListVisibility attribute. The attribute determines if the label name is included alongside any messages which have this label. Consider the following:
User has 5 messages in his INBOX. Each of which has labelA and labelB applied to them.
The messageListVisibility is hide for labelA and show for labelB.
When the user click on the Inbox and sees those 5 messages, labelB will show for each message in the list of messages, it's just to the left of the message subject.
The documentation describes messageListVisibility as:
*The visibility of messages with this label in the message list in the Gmail web interface. *

Related

How to avoid placing fields everytime a contract is generated with DocuSign Gen and DocuSign Envelope in Salesforce?

I have the following scenario that I need to put in place:
A user from SF must generate a contract with tables for a customer. As soon as the contract is generated, the user will handle the contract in a tablet to the customer, so he can sign it off in person.
To implement this I'm using DocuSign Gen to generate a template, because this particular template needs to have a table with multiple rows. So:
I declared all the Salesforce Fields I'm using on the contract .
I placed all the anchor texts on the MS Word file.
I declared all the DocuSign Fields (i.e. Signature, Name, Date Signed).
I also placed them all their anchor texts at the bottom of the MS Word file.
Finally, I selected a DocuSign Envelope (check the description below) template to streamline the signature delivery.
For the DocuSign Envelope, I simply created a template, but I didn't select any document, since that was going to be handle by the DocuSign Gen template. I defined the recipients (In Person Signer), and for the sending experience I selected the option Send Now: Skips all controls and sends the envelope immediately.
So, I was expecting that after clicking on the DocuSign Gen template button, the contract will be sent to the user so, he can handle the contract to the customer, to sign it directly.
Instead, after the contract is sent, and the user handled the control to the customer, they need to place AGAIN the DocuSign Fields (i.e. Signature, date, name) on the contract before signing it off.
How can I avoid that? I want neither the user nor the customer to place the fields again, since that's already defined on the template created on DocuSign Gen already.
It’s absolutely possible to set up an eSignature Envelope Template Configuration that works with anchor-tag/autoplacement, either with or without a static document pre-uploaded into the template. There are default anchor fields we offer out of the box that are listed in this support article. But it’s also possible to create your own custom merge fields with defined anchor text with the {r} wildcard placeholder.
The trick is to also ensure your recipients use the standard role naming conventions of “Signer 1”, “Signer 2", etc.
Example:
If you have \s1\ on the document, then that will get assigned to the recipient you’ve defined with the role name of “Signer 1”.
\s2\ for “Signer 2.” etc.
If you create a custom field with the defined anchor text of something like \ObjectName_FieldName_{r}\
Then on the document you place the text as \ObjectName_FieldName_1\
That field would be assigned to “Signer 1”
\ObjectName_FieldName_2\ would be assigned to “Signer 2" etc.
More information can be found here - https://support.docusign.com/s/document-item?language=en_US&bundleId=srl1586134368658&topicId=rvg1644270913133.html&_LANG=enus
From what I can tell, linking an Envelope Template to a Gen Template renders the Gen Template useless. I can't find any clear documentation about how they are supposed to be used together.
This is what I did:
Created a Gen Template with a Word document that has all of my anchors.
I wanted the Recipients to be auto-populated, so I also created an Envelope Template (without a document) and linked it to the Gen Template.
I expected that when I clicked the Gen Template button, it would use my tagged template, auto-choose the recipients, and send. However, as you stated, you have to replace all of the fields. I have no idea why.
I tried #inbar's suggestion of using autoplacement. I created a new document with these tags and uploaded it to the Envelope Template. This works as expected, but it seems to render the Gen Template useless.
At this point, I think the best route is to not use a Gen Template and just use an Envelope Template with autoplacement. I wish the documentation was more clear about how to use these templates together.

Salesforce Screen flow search and display record information

I'm working on a screen flow. The idea is to have a lookup component the user can search a contact. Then I would like to display the information from the Contact (Account Name, Contact Name, Number Email) and I would like to be able to have the user update that information if needed. I just stomped on how it can be done. I know it should be able to be pulled from the record ID in some type of way and maybe use an Assignment to display the information. Can someone guide me on a next step or if anyone has an instructional video would be helpful.
Thanks
You wouldn't be able to display the looked up contact's fields on that screen as soon as you populate that field. That would be something only possible in code (aura component or lwc).
What you can do, however is -
Get Record element after that screen element. (Get Contact, where Id = lookupcomponent.recordId)
Then EITHER:
use the new Fields (BETA) option on another screen Fields (BETA)
(this method is easier, doesn't have as much control and is limited on fields, depending on data type, you can use)
add inputs one by one and set the default values Add Fields One By One
(this method allows more control)
Then, you will need an update element. If you used the Fields (BETA) you can just update the record variable. If you did the inputs one by one, you will need to update the contact and set fields individually.
Full Flow Example

Docusign Formatting and Salesforce integration issue

I am in a Salesforce environment and trying to send out a docusign document using Docusign and Conga. I am using a 30 day trial.
1.Using Conga and Docusign works very well together and the formatting is correct except that I need to have 2 radio buttons on the form. Is there a way to add anchor tags to my Word document and hide them(white text) like I do for the Docusign signature and date tags?
I tried following the documentation for creating the radio buttons in Docusign and tie them to a picklist field in Salesforce but I have yet been able to write back to Salesforce.
How do you control the text length for a Docusign template? I have fields that make up the address but the spacing is not dynamic so depending on the field value the text may run into each other. Is there a way to have the fields adjust based on field value length?
How do I show multiple related records? I have a case with multiple activities associated to it and I need to display them. In Conga I use a table and all of the records show. But if I create a docusign template it is only showing the first record.
If at all possible I would prefer to add the anchor tags to the existing document since the formatting is cleaner.
Michael
There is. You'll want to avoid applying anchor tags directly to a DocuSign template when working in the web console. The reason for this is that when you're sending from Salesforce with or without Salesforce anchor strings you're going to receive an error message indicating that there's no text associated with an anchor string.
You can accomplish this through Custom Fields inside of Salesforce.
Basically, you place your text in white where you want the tag to attach to your document. You'll want to set the anchor string in the format of \variable{r}\ on the tag, then in the underlying document you would replace {r} with the recipient number in the signing order.
IE: \variable_{r}\ becomes \variable_1\, when Salesforce picks this up it will tag the document automatically. For more information, see here: https://support.docusign.com/guides/dfs-user-guide-use-automatic-anchor-text-with-custom-tags-user.
In terms of writing back the value of a Radio Button, as I'm sure you've noticed this can be tricky. The values for the picklist in Salesforce need to match up exactly, then be written back by adding a new line in your Connect object. A step by step guide is available on the support site: https://support.docusign.com/articles/DocuSign-for-Salesforce-How-to-update-a-Salesforce-Field-with-a-DocuSign-Radio-Button-Value.
The Width of a text field is determined in one of a few ways:
1) You can supply a fixed size in the API call being used to generate them.
2) You can save the custom field inside of DocuSign as a Custom Field after setting the width to it.
3) Set the Fixed Size flag to false, then the text field should fill itself out when text is applied to it.
Would you mind being more specific in regards to the status record?

How to validate form field with Parsley JS if field input has been populated automatically?

I have a signup form where the user is supposed to enter amongst other personal details also his phone number's country prefix (e.g. '+49' for Germany). Now I have a script running which automatically detects the country prefix according to the user's IP geo location.
If the IP location is successfully determining the user's current location, it puts the country code automatically in the signup form's prefix field.
This means that the user doesn't have to enter the prefix manually.
My question is: once the signup form is loading, and all fields are empty except for the country prefix, how can I validate the country prefix field successfully prior to hitting the submit button?
I tried all kinds of triggers from the jQuery Events page as suggested by the ParsleyJS documentation but I don't get it done..
Any help on this would be gladly appreciated!
Edit to further clarify: If you're visiting the signup page, the IP location script detects your location, translates that into your country's phone prefix, and puts that number into the "Prefix" form field. So you don't have to put there anymore by yourself. This works only if the the IP locations script successfully identifies your location of course, however this works in most of the cases. So what I would like to achieve is that this form gets it's green validated background, although you didn't put in the prefix yourself. In other words, the prefix is already in the field in most of the cases.
I'm using the data-parsley-triggers, no jQuery or JS to validate the whole form.
You can see in the picture that I entered a first name, Foo, which validated upon data-parsley-trigger="change". The blue arrows show the fields which have been filled automatically by the IP location - and they are not validated as I'm missing the right trigger.
It's not clear what you are trying to achieve (why validate the field when it's clear it will be valid), but why not simple $('input[name="phone_prefix"]').parsley().validate()?

How do I make it so that a user must either enter text or select a check box on Salesforce?

I am using salesforce for a group project here at SJSU, the thing is this is our first time using it, and we are having a little bit of trouble programming some things on Salesforce.
What we are trying to do:
We have a section on one of our forms where users will give us authorization to use Data they submit, the usage of this data will be under the terms set by those who submit the data. If the user does not want to set limitations on their authorization for us to use the data then they can select a checkbox called labeled "none" which basically means they are setting no limitations on what we can use their data for.
What we want to do is, if users select the checkbox then we want the users to not be able to enter any text into the textbox. If users enter text into the box while the checkbox is checked we want an error message to appear which will let the user know that no data can be entered into the box if the checkbox is checked. However if no checkbox is checked then we want users to be able to enter the data. How do we go about doing this
AND (None_c = True then Limitations_c has to be empty, elseif None_c = False then Limitations_c cannot be empty.)
If you want to leverage the out of the box UI (Page Layout), then you will likely want to use Validation Rules.
https://help.salesforce.com/HTViewHelpDoc?id=fields_defining_field_validation_rules.htm&language=en_US
The gist of it is that you want to define Error criteria, so when this criteria evaluates to true, and error is thrown. In that case, you should be able to construct something similar to the following:
Checkbox1__c && NOT(ISBLANK(Text2__c))
Validation rules would be the easiest way to execute this, though checking the box would not dynamically prevent users from entering text. With a validation rule, it just wouldn't let a users save.
The nice thing about using validation rules is that you can construct them such that checking None__c will not vomit on the user unless they actually modify Limitations__c. ISCHANGED() is great for that.
If I could suggest an alternative, the way I would implement this is to treat an empty Limitations__c as None__c = True. It simplifies things for users, and you can add a formula-driven checkbox if a checkbox element is truly required.

Resources