Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object button that works as Add New button for XREF

TuanKhoa
Collaborator III

Hi,

 

I want to create a button by using Custom Object that does the same work as the "Add New" button for a XREF Field.

 

Capture.PNG

I tried to do something like this, but I just got the button, and nothing happened when I clicked on it.

 

<div style="text-align:center;"> 
 <a class="ContentURL" href="javascript:$('#master_DefaultContent_rts_s4182_f20694c_Add_New').click();"> 
  <img src="../BackgroundImageGenerator.axd?className=StyledButton&classProperties=caption:+++++AddNew+++++;iconSetStyle:VistaRound;baseColor:%23BFDDF5;disabled:False"/> 
 </a> 
</div>

 

I don't know how to put the "fieldid" - "refmodid" - "moduleid" in the code.

 

Could anyone help me With this? Thank you!

 

/Tuan

 

GhgcdMq8HwHRCWZuqMwEETnAH3l0sBKt8utOGHAgtsY=

Regards,
Tuan
76 REPLIES 76

You mention that the jquery framework isn't loaded when it comes to iviews.  I understand that I can't just reference the library, but what if I add a script source tag to google jquery api libraries, would that work?  -- I feel like I "know" this and that's why it's not embedded in my custom iview, but I may have only figured this out through discovery.

 

While I'm on the topic... React? (custom object or iview)

I typically use Archer's version of jQuery in case I need to make any calls Archer specific using,

<script type="text/javascript" src="/shared/scripts/jquery/jquery.js"></script>
You should be able to use React in either as-long-as you pull-in the framework.

 Advisory Consultant

You should be able to use React in either as-long-as you pull-in the framework.

This would be only on-prem, though, right?

I'd say yes, being I'm not to familiar with React and what it entails to implement.

 Advisory Consultant

Yes Petty, Parent record will be same for all the records. please let me know how can we pass that.

Pavan_2835
Contributor II

Could you please say what is levelid in above code and is refmodid the module id of the referenced application?

@Pavan_2835 just inspect the Add New link the application and you'll get all that information.

 Advisory Consultant