This topic contains 1 reply, has 0 voices, and was last updated by david.smith 7 years, 9 months ago.

  • Author
    Posts
  • #5961

    khultquist

    For items, I’ve referenced this post a few times, and there are some good resources online too. But I can’t find any conversion for transactions, so I’m posting my incomplete list here.

    Transaction Type
    Internal ID

    CashSale
    cashsale

    Check
    check

    Commissn

    CustChrg

    CustCred

    CustDep
    customerdeposit

    CustInvc

    CustPymt
    customerpayment

    CustRfnd
    customerrefund

    Estimate
    estimate

    ExpRept
    expensereport

    InvCount
    inventorycount

    ItemShip
    itemfulfillment

    Journal
    journalentry

    LiabPymt

    Opprtnty
    opportunity

    Paycheck

    PurchOrd
    purchaseorder

    RtnAuth
    returnauthorization

    SalesOrd
    salesorder

    TaxLiab

    TaxPymt

    TegPybl

    TegRcvbl

    TrnfrOrd
    transferorder

    VendAuth

    VendBill
    vendorbill

    VendPymt

    WorkOrd
    workorder
    This is a cached copy. Click here to see the original post.

  • #5962

    david.smith

    I’ve compiled the following if anyone is interested in using it.

    Code:
    // by David Smith @ SWK Technologies
    function getRecordIdByTypeid(id){
    var types = {
    “Account”: {
    “typeId”: -112,
    “id”: “account”,
    “category”: “List”
    },
    “Accounting Period”: {
    “typeId”: -105,
    “id”: “accountingperiod”,
    “category”: “List”
    },
    “Bin”: {
    “typeId”: -242,
    “id”: “bin”,
    “category”: “List”
    },
    “Call”: {
    “typeId”: -22,
    “id”: “phonecall”,
    “category”: “Activity”
    },
    “Campaign”: {
    “typeId”: -24,
    “id”: “campaign”,
    “category”: “Marketing”
    },
    “Case”: {
    “typeId”: -23,
    “id”: “supportcase”,
    “category”: “Support”
    },
    “Class”: {
    “typeId”: -101,
    “id”: “classification”,
    “category”: “List”
    },
    “Competitor”: {
    “typeId”: -108,
    “id”: “competitor”,
    “category”: “Entity”
    },
    “Contact”: {
    “typeId”: -6,
    “id”: “contact”,
    “category”: “Entity”
    },
    “Customer”: {
    “typeId”: -2,
    “id”: “customer”,
    “category”: “Entity”
    },
    “Customer Category”: {
    “typeId”: -109,
    “id”: “customercategory”,
    “category”: “List”
    },
    “Department”: {
    “typeId”: -102,
    “id”: “department”,
    “category”: “List”
    },
    “Email Template”: {
    “typeId”: -120,
    “id”: “emailtemplate”,
    “category”: “Marketing”
    },
    “Employee”: {
    “typeId”: -4,
    “id”: “employee”,
    “category”: “Entity”
    },
    “Employee Type”: {
    “typeId”: -111
    },
    “Entity Status”: {
    “typeId”: -104
    },
    “Event”: {
    “typeId”: -20,
    “id”: “calendarevent”,
    “category”: “Activity”
    },
    “Issue”: {
    “typeId”: -26,
    “id”: “issue”,
    “category”: “Support”
    },
    “Item”: {
    “typeId”: -10,
    “id”: “item”,
    “category”: “Item”
    },
    “Item Type”: {
    “typeId”: -106
    },
    “Job (Project)”: {
    “typeId”: -7
    },
    “Location”: {
    “typeId”: -103,
    “id”: “location”,
    “category”: “List”
    },
    “Module”: {
    “typeId”: -116
    },
    “Opportunity”: {
    “typeId”: -31,
    “id”: “opportunity”,
    “category”: “Transaction”
    },
    “Partner”: {
    “typeId”: -5,
    “id”: “partner”,
    “category”: “Entity”
    },
    “Product”: {
    “typeId”: -115
    },
    “Product Build”: {
    “typeId”: -114
    },
    “Product Version”: {
    “typeId”: -113
    },
    “Project (Job)”: {
    “typeId”: -7,
    “id”: “job”,
    “category”: “Entity”
    },
    “Role”: {
    “typeId”: -118,
    “id”: “role”,
    “category”: “List”
    },
    “Saved Search”: {
    “typeId”: -119
    },
    “Subsidiary”: {
    “typeId”: -117,
    “id”: “subsidiary”,
    “category”: “List”
    },
    “Task”: {
    “typeId”: -21,
    “id”: “task”,
    “category”: “Activity”
    },
    “Transaction”: {
    “typeId”: -30
    },
    “Transaction Type”: {
    “typeId”: -100
    },
    “Vendor”: {
    “typeId”: -3,
    “id”: “vendor”,
    “category”: “Entity”
    },
    “Vendor Category”: {
    “typeId”: -110,
    “id”: “vendorcategory”,
    “category”: “List”
    }
    }
    var recId = ‘customrecordtype’;
    for(var type in types){
    if(types[type].typeId == parseInt(id)){
    recId = types[type].id ? types[type].id : null;
    break;
    }
    }
    // if the result is null it’s not supported
    // default to custom record type if not found here…
    log.debug(‘getRecordIdByTypeid – record type’,recId);
    return recId;
    }

You must be logged in to reply to this topic.