Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object

AmitGupta
Collaborator III

Hello All, 

I am looking for a Custom object for Add New Button in the Questionnaire , so that when user click on Add new in Questionnaire he redirects to the CR Application . Currently a CCR has been built from Application to Questionnaire , so for the Related Fields in Questionnaire the Add New & Lookup is hidden .

So I am looking for Add New in that Questionnaire , so that after clicking on it it will redirect to the CR Application Record .

11 REPLIES 11

Ilya_Khen
Champion III

AmitGupta,

Add a new CR, hide from user layout and use the button code from it by observing Add New link from DevTools.

Good idea , many thanks ! I will check

Hi Ilya,

I have written the based on Inspect for Add new , but somehow the Add New does not show if I move the field Out of Layout .

Also when its in Layout the Add New is without Hyperlink . Do you know what could be the issue here ?

 

<a title="Add New" class="ml-command-item add-new" id="custom_Add_New2" href="#">Add New</a>
<script type="text/javascript">
$('#custom_Add_New2').click(function(){
javascript&colon;$pb('{"a":[{"key":"contentid","value":"1784226"},{"key":"fieldid","value":"54333"},{"key":"moduleId",
"value":"362"},
{"key":"refmodid","value":"670"},{"key":"levelid","value":""},{"key":"isSubform","Value":"False"},
{"key":"isAnswerValuesSubform","Value":"False"}],"e":"refFieldAddNew"}');csp(event);return false;
});
</script>

Ilya_Khen
Champion III

You can keep CR in layout and just hide it from user. Regarding the custom object itself, you do not need to rewrite functionality, but make it so, that it would click the Add New link of the hidden CR.

sorry Ilya , If I am not able to understand properly . So If I hide the CR in layout from User , the Add New Link also gets hidden ,as I tried with DDE . But how can you shoe only the Add new button from CR , but hide the CR from end user ?

I could not catch that . Thanks for help !

Ilya_Khen
Champion III

When CR is hidden from end-user, it still present in the layout. Meaning that Add New link is also present, just hidden. Thus, you can create a Custom Object which would click on the hidden Add New Link. Similar how you program clicking on Save button or Apply $('master_btnSave').click(); You just need to find proper identifier for the Add New via DevTools.

AmitGupta
Collaborator III

Thanks Ilya , I will check! 

Hi Ilya,

I think I am missing something still, the Identifier should be with input ID , but when I hove rover the Add New Button by clicking Inspect, after div tag , I don't get the identifier . can you please see advise , i have provided the snipper below.snipp1.pngsnipp2.png

Ilya_Khen
Champion III

ID attribute of your <A> tag should be the one your are looking for.