Apostrophe in DocuSign for Salesforce URL button - salesforce

We recently converted our DocuSign for Salesforce buttons from JavaScript to URL format and I'm having trouble now getting an apostrophe to show up in my subject line.
In the JavaScript button code, the format was:
CES='Document for '+ Account.Name + '\'s Approval '
However in URL format, this outputs as:
Document for Test Corp\'s Approval
How do I get the apostrophe to appear properly?
Thank you.

There might be a better solution than this but I figured out that if I use a Custom Label I could make this work.
I created a Custom Label called Apostrophe with a value of ' I could reference that in the code.
CES='Document for '+ Account.Name + $Label.Apostrophe + 's Approval '
That seems to do the trick.
Custom Label

Related

When using filter on the graph API, how to do you only return data where a field isn't blank

When using filter on the graph API, how to do you only return data where a field / property isn't blank
currenty doing https://graph.microsoft.com/beta/users?$filter=EmployeeId ge '!' but these doesn't seem the correct way to do this... doing EmployeeId ne '' isn't allowed it seems. This field is blank not null when not filled in, atleast in my tenant anyway.
...
"displayName": "Test Example",
"employeeId": "000Blah",
...
Any one able to confirm if this is the correct way?
Basicly only want to return the records where people do have their employeeId filled in.
There currently is no filter capability in graph on the users endpoint to do null(or empty) filtering. I believe there are requests all over the internet asking microsoft to implement it, however as it stands, there is no correct way to do it. your work around seems as good as any.
Here is a user voice request for it https://microsoftgraph.uservoice.com/forums/920506-microsoft-graph-feature-requests/suggestions/36040288-useful-user-endpoint-filtering you can vote for it
In this case, the $filter does not support -ne, but per my test, it supports -eq, that means you can get the users who did not fill the employeeId(just a tip, not sure if it helps).
Note: You should know the counts of the blanks in the employeeId, it means the (hit the space bar once) is different from (hit the space bar twice).
My workaround is to use the powershell to do that, make sure you have installed the AzureAD module and use Connect-AzureAD to login.
Use the command below, you can get the users who filled the employeeId. In my sample, I use only one blank.
Get-AzureADUser -All $true | Where-Object {$_.ExtensionProperty.employeeId -ne ' '}
This should do the job
https://graph.microsoft.com/beta/users?$filter=userType eq 'Member' and employeeId ge ' '
Please notice the space.

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 do I prevent a user from using special characters in display name on DNN

How do I prevent a user from using special characters in display name on DNN?
I have managed to get it right for username by using the below, but it doesn't work, even though DNN help text indicates that this field is meant to apply to Username and display name.
In the Site Settings, tab "User Account Settings" you can find a setting "User Name Validation". There you can add a validation expression. I think this is a regex.
Happy DNNing!
Michael

Copy header and detail using custom button

I have a custom object "Order" with detail object "Order Lines". I want to place a custom button on the Quote header called "Create Order" that when clicked will copy the Quote header and detail records and create a corresponding "Order" and "Order Lines" records.
Mimicing the same functionality that is standard when syncing a quote to an opportunity.
I'm wondering what is the best approach to do this? Should the custom button use the ajax toolkit and execute javascript using the onclick event?
Or, would a visualforce page with a controller be a better option for this?
Are there any examples that demonstrate this functionality?
Thank you.
I'd go with a bit of Apex code. Faster than doing it purely with JavaScript toolkit plus let's face it, S-Controls are thing of the past. There's a chance that if your colleague will have to maintain it in future he'll know Apex but maybe not the JS toolkit.
Now - simple JS button + call to Apex exposed with webservice keyword or a visualforce page?. Only you can answer that. Would you like to display the "edit" page, let user change some values and save only afterwards? Are there some statuses on order or line item that have to be "reset" before you save the clone?
As for actual code - best type of clone will dynamically select all (so it'll work also in future when you add new fields). Sadly there's no SELECT * syntax in Apex, you need to use describe calls.
Something like this (untested! just to give you an idea)
List<Schema.SObjectField> orderFields = Schema.SObjectType.Order__c.fields.getMap().values();
List<Schema.SObjectField> itemFields = Schema.SObjectType.Order_Line__c.fields.getMap().values();
// You might also want to use simple fields.getMap().keyset(), that'll be set of strings
Id orderId = 'a01...';
String orderQuery = 'SELECT ' + String.join(orderFields, ', ') + ' FROM Order__c WHERE Id = :orderId';
Order__c oldOrder = Database.query(orderQuery);
Order__c newOrder = oldOrder.clone(false,true); //options do not retain ID; deep clone
insert newOrder;
String itemsQuery = 'SELECT ' + String.join(itemFields, ', ') + ' FROM Order_Line__c WHERE Order__c = :orderId';
List<Order_Line__c> oldLines = Database.query(itemsQuery);
List<Order_Line__c> newLines = oldLines.deepClone(false);
for(Order_Line__c newLine : newLines){
newLine.Order__c = newOrder.Id;
}
insert newLines;
Feel free to experiment with it (refactor to a helper method, work on generic sObjects instead of concrete Orders... after all if lookup change is the only thing to do - why not?). Also if you're sure orders will have < 200 lines you can try making the query in one go?

Show Opportunity Stage Name Picklist read only based on user role

I am new to Salesforce and need an idea how is possible that suppose I have one user named "ABC".I don't want to show the Opportunity StageName picklist when "ABC" user login in editable form or just want to show the StageName value in textfield or anything other.
I tried to set the permission under setup but not achieved what I want. I just came to know that formula field or formula will used for that, as I am new to Salesforce so I unable to create a formula field.
Thanks.
To achieve this You should try field level security settings:
https://login.salesforce.com/help/doc/en/admin_fls.htm
You can select per field /profile combination which fields are visible and which are editable.
You cannot apply FLS on system required fields neither can you make them read only on the page layouts. You also cannot remove such fields from page layout. In short you are stuck with this field for ever!
I wish Stage was not a required field.
Mitesh

Resources