Call different quick creates from two different list views (

Posted by ByronB on 16-Mar-2015 14:51

Hi, I have 2 objects:

Account 1:M TPA

I have 2 separate relationships from Accounts to TPA, there are 2 TPA list views within Accounts. Each list view should launch its own quick create, I have looked but cant see anything built in to select the quick create being launched?

I have tried to override the onclick function being called on the quick create button but it seems very clunky and was wondering if there is a better was of achieving this?

<script>
$(document).ready(function()
{
	var onclickFunction = $("#rbi_S_54473 > table > tbody > tr > td > div > div > div > span > div > a").attr("onclick");
	
	var startPos = onclickFunction.indexOf(",") + 1;
	var endPos = onclickFunction.indexOf(",",startPos);
	
	onclickFunction = onclickFunction.replaceBetween(startPos + 1, endPos, 157180); // 157180 is the quick create ID of the Customer TPA

	$("#rbi_S_54473 > table > tbody > tr > td > div > div > div > span > div > a").attr("onclick", onclickFunction);

});

String.prototype.replaceBetween = function (start, end, what)
{
	return this.substring(0, start) + what + this.substring(end);
}
</script>


All Replies

Posted by Orchid Corpin on 16-Mar-2015 17:17

Hi,

Have you checked in the Design Page then View properties that the "Enable Quick Create" was enabled?

Regards,

Orchid

Posted by ByronB on 16-Mar-2015 17:20
Yes it is enabled hence how I can override the Id to launch the cloned quick create. 


Posted by Orchid Corpin on 16-Mar-2015 17:33

So in your setup you have another quick create page and you want it to be used in the second list view?

Posted by murali on 16-Mar-2015 18:00
You can try to override the quick create calling function to point it to the QCreated ID of your choice.
Try this by adding a script component to the page.
 
 
<script type='text/javascript'>
var realQcFn = rbf_doQuickCreate;
rbf_doQuickCreate  = function() {
                var args = Array.prototype.slice.call(arguments); 
  args[1] = <myother QC Page ID>;
  realQcFn.apply(window, args)
  return false;
};
</script>
 
 
[collapse]
From: ByronB [mailto:bounce-ByronB@community.progress.com]
Sent: Monday, March 16, 2015 6:21 PM
To: TU.Rollbase@community.progress.com
Subject: Re: [Technical Users - Rollbase] Call different quick creates from two different list views (same object)
 
Reply by ByronB
Yes it is enabled hence how I can override the Id to launch the cloned quick create. 
 
Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]
This thread is closed