Docusign for Salesforce Void Button - Passing Envelope ID - salesforce

I'm creating a custom void button in the lead object, but I can't seem to pass the envelope ID, the test lead does have an envelope attached/associated.
Is there a built-in method in "docusign.js" to get or retrieve the DSEID?
My button js code:
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
window.location.href='/apex/dsfs__DocuSignVoidEnvelopeStandAlone?e={!dsfs__DocuSign_Envelope__c.dsfs__DocuSign_Envelope_ID__c}';

Related

MS Access - SubForm field pass through

I have a Navigation Form in which the first button is defaulted to show a blank form (Request form) where users will enter information.
There's an option on this Request form that if there are multiple requests under this request, `a box is checked and another form opens and the request number from the Request form is defaulted into the multiple request form's request number field (this is the link).
On the Multiple Request window's ID field in Property Sheet/Data/Default Value I have =[Forms]![frmRequests]![RequestID]
With the Request form open on its own, this works great, but within the Navigation form it doesn't. Is there another layer that I need to add so the default value works in either format? I will be using it in the Navigation form primarily.
The following worked for me.
=Forms!NavigationFormName.NavigationSubformName.Form!RequestID

adf declarative component custom methods queueEvent() not working

I am using Oracle ADF JDev 12.1.3
I have a custom declarative LOV component and one custom method "valueChangeEvent",
after user select some values from the popup, i will do some validations, if all validations are ok, then I need to raise "valueChangeEvent" event,
so that in the final jspx page additional logic's can be implemented,
My declarative component method definition as follows
<method-attribute>
<attribute-name>
valueChangeListener
</attribute-name>
<method-signature>
java.lang.Void method(javax.faces.event.ValueChangeEvent)
</method-signature>
<required>
false
</required>
</method-attribute>
In my custom LOV Component, i have one input text and button, I tried the following to invoke my custom method within the command button action, but it does not invoke the event at the main form, but no error shows
// get the component reference using Face Context ValueExpression
_this = getThisDeclarativeCompoent();
//try to queue the valueChangeEvent - but this does not work
_this.queueEvent(new ValueChangeEvent(_this, NewValue, OldValue));
Consuming application code is as follows
<af:declarativeComponent viewId="/ASGLOVBrowser.jspx" id="dc3" label="Modules" LOV_Name="MODULE"
bindingAttribute="#{bindings.ModuleId}" showDescription="true"
multiSelect="false" matchingField="CODE"
valueChangeListener="#{viewScope.DeclarativeTestBean.test_valueChangeEvent}"/>
appreciate if someone can help...
Value Change event is raised by the framework only, when input value changes, therefore you can't initiate the event without the value being changed either from UI or programatically.
So, you can get a reference of the input text UIComponent and change the value programatically:
RichInputText uiComp = <<<get reference>>>;
uiComp.setValue(newValue);

Adobe CQ EXTJS component data post to servlet

I got a EXTJS CQ component with two text fields and and button.
When the "save" button clicked, the dialog data has to be submitted to custom sling servlet.
Custom sling servlet will call a osgi service and finally saves data to crx using jcr api.
Question : How to post the dialog data to servlet ?
I am new to CQ, Thanks for any help!
-Sri
I'm assuming when you say "save" you are referring to some custom button and not the "OK" button that saves the dialog data to the node.
Add a handler to the save button. The handler function must retrieve the dialog object, loop over all the fields in it and post the values to your custom servlet. The handler should be something like this
function(button,event){
//fetch dialog using the save button
var dialog = button.findParentByType('dialog');
var params = {}; //parameters to post
var textfields = dialog.findByType('textfield'); //returns all textfields in the dialog
for(i=0;i<textfields.length;i++){
params[textfields[i].name] = textfields[i].getValue(); //add the value to params with name same as the name you have provided to the textfield
}
$.post( "path to your servlet" , params ); // you can also use CQ.shared.HTTP of cq's ext js package to do the post
}
In case all you want to do is post the form data on clicking the "OK" button that comes by default, set the formurl property of the dialog to the path of your custom servlet. In this case if the values aren't stored back as properties with appropriate names on the corresponding node like a dialog normally does, the dialog will not be able to load the values when the component is re-edited.

Angular - on invalid field, fire method?

When my field becomes invalid, is there a way to fire a method in my js?
So for example, the user fails to fill out the name field, clicks submit, I want to:
console.log('they forgot');
Thanks
There is a $error object made available by AngularJS. This object contains all of the validations on a particular form and tells if they are valid or invalid.
To get access to this property, we can use the following syntax:
formName.inputfieldName.$error
Here is a jsfiddle sample
This document is a good reference for understanding form-validations using AngularJS.
Also, for dealing with custom validations, you can add your own directives. A sample of making such directives is given in the link above.

Add button to existing standardController page SalesForce

I want to add a button to an existing SalesForce object page that already has a standardController and page built by salesforce.
I have a utility class that I want to call a function by a button on my object.
Currently, I only have seen ways of doing this by a WebService, which I included the code snippets below. I am thinking there has to be another way, due to the fact I want to reuse this code in other places that do not require a webservice, and I want to avoid writing two procedures for same thing. I know I could use a wrapper I guess, but want to see if there is another way of adding a button that is more in line with the new salesforce way of visualpages, and not s-controls/web services.
So, when I add a button on the salesforce page by going to setup-->create-->objects then scroll down to add a button, it requires that the button be an scontrol or javascript. I found this technique
Apex code:
global class class1{
WebService static Integer method1(String iTitle){
Your logic here
}
}
Custom button code:
{!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/14.0/apex.js")}
var result = sforce.apex.execute("class1", "method1",{iTitle : noteTitle});

Resources