Irs and cra lookup

From SmartWiki
Jump to: navigation, search

Ambox warning pn.png This article is deprecated and the information contained within may no longer be correct.

Orgsearch is a system page where users can look up organizations in multiple databases such as IRS, CRA, or UK Charities. Up to now, implementation practice is to give users a button on the registration page that will open this page on a different window. This is because there is a built-in function on the orgsearch page which lets users click on the organization name and it will pass information back to the opener page (where you launched the new window).

Since occasionally there is a need for making modifications to this system page, parameters can be passed in the link on the opener page. To do that, you will need a script which is called onclick on a button.

  • Either create a field of type Special - Browser Script, or insert a script on the registration page containing the following:
 function opencra(){
 	alert('Search your organization CRA number or name on the page that will open, then find and click on your organization name.');'/Apps/Bridge/os_orgsearch.jsp?&namefield=cname&ctlid=cf_1234567&addressfield=address&cityfield=city&statefield=state&zipfield=postalcode&closeonclick=1&database=1&numonly=1&typeallow=,50,&rootcid=123456&instructiondivid=instructiondivid&callback=callbackfunc','srh_win','menubar=no,scrollbars=yes,status=no,resizable=yes,top=10,left=10,dependent=yes,alwaysRaised=yes')
  • Default and/or limit the option on the database type drop down
  • The above example has typeallow=,50,
  • Use the following for typeallow (options visible on the dropdown) parameters
ID Name
1 Schools
2 Schools Agency
40 UK Charities
50 Canadian Charities
60 Canadian Charities (inactive)
70 Australian Business Register
90 Guidestar
  • Multiple databases can be used. For example, to launch a organization lookup panel for IRS database, enter database=0 (defaults to IRS) and typeallow=,0,
  • Note that when database is set to "1", the field captioned EIN will be re-captioned to Registration #.
  • Put instructions on the page
To put custom instructions on this page, you need to create a hidden div on the registration page and pass the div id in the URL:
<div id=instructiondivid style="display:none"><br>NOTE: <ul><li>When searching for your charity's name, a keyword search is sufficient. Example: "Waco" instead of "The Waco Foundation"</li><li>When searching for your CRA number, do not include spaces or dashes. Example: 119241727RR0001 </ul></div>
  • Set the root company ID to your own root company ID
  • The above example has rootcid=123456
  • See Determining the root companyid to determine your root company ID, and replace 123456 with your unique root company ID
  • The rootcompanyid, among other things, will determine the colors of the lookup page.
  • Map fields to registration page fields
When clicked on the organization link, the function will pass the details to the main registration page. The mapping is done on the link:
Note: ctlid will pass the CRA or EIN number of the organization and should be mapped to the custom field where you want to store the CRA or EIN number on the organization record.
  • See Determining the Custom Field ID for instructions on finding the custom field ID.
  • Replace cf_1234567 with cf_your custom field ID
  • Additional mappable fields from the IRS Database are as follows:
Field ID Field Name
&ctlid Lookup Field ID (EIN)
&foundationtype Foundation Type
&foundationcode Foundation Code
&organizationtype Organization Type
&status Status
&ntee NTEE
&subsection Subsection Code
&assetamt Asset Amount
&incomeamt Income Amount
&f990amt Form 990 Revenue Amount
&sortname Sort Name
  • Pass lang for language
  • Rename Numeric ID field
  • The above example has database=1
  • The database parameter will determine the terminology used for the Numeric ID field
  • If database is set to 0 (i.e. database=0) then the label will changed to EIN
  • If database is set to 1 (i.e. database=1) then the label will changed to Registration #
  • Search using Numeric ID field only
  • The above example has numonly=1
  • The numonly parameter will determine the number of fields the user can search against
  • If numonly is not used or is set to 0 (i.e. numonly=0) then the user will be able to search against all possible fields (i.e. Name; Registration #/ EIN; Address; City; State / Province).
  • If numonly is set to 1 (i.e. numonly=0) then the user will only be presented with the Registration # / EIN field to search against. The other fields (Name etc.) will be hidden.
  • Delimit organizations returned by Foundation Code
  • If the &exfcode=15,16 parameter is included in the URL, the search will not return any organizations with a Foundation Code of 15 or 16. (See list of Foundation Codes here.)
  • Call a JavaScript function on the sign-up page when an organization is selected.
  • If the &callback=callbackfunc parameter is included in the URL, when a search result is selected the system will call the callbackfunc function on the sign-up page.
  • The callbackfunc must be defined on the sign-up page (can be renamed as desired)
  • Create a button to launch the lookup page
<input class="Button" onclick="opencra();" value="Validate Organization" type="button">

See Also