示例#1
0
def main():
    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()
    soql = "SELECT Id,Name,MstDisease__c,Other__c FROM AccountDisease__c WHERE AccountDisease2Account__c='%s'" % (
        args[1])
    response = msf.query(soql)
    p(response)
    return response
def main():
    args = sys.argv
    check_args(args, 1)
    account_id = args[1]

    msf = LibMtSalesForce()
    soql = "SELECT Id From Contact Where AccountId='%s'" % (account_id)
    response = msf.query(soql)
    p(response)
    return response
示例#3
0
def main():
    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()
    soql = "SELECT Id,AddressClass__c,EmpDepartment__c,MstWorkClassId__c,EmpName__c,EmpClass__c,Zip__c,Pref__c,City__c,Address__c,Tel__c,isShippingAddressOfMT__c,shisetsu_code__c,checkFlag__c FROM Address__c WHERE AccountId__c='%s'" % (
        args[1])

    response = msf.query(soql)
    p(response)
    return response
def main():
    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()
    soql = "SELECT Id,Name,MstCategory__c,Other__c,IsPrimary__c FROM AccountCategory__c WHERE AccountCategory2Address__c='%s'" % (
        args[1])

    response = msf.query(soql)
    p(response)
    return response
示例#5
0
def main():
    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()
    soql = "Select CreatedDate, AccountPoint2Account__c, Point_i__c, Comment_c__c FROM AccountPoint__c WHERE IsDeleted = FALSE AND AccountPoint2Account__c = '%s' AND CreatedDate >= 2018-04-01T00:00:00+09:00 order by CreatedDate" % (
        args[1])

    response = msf.query(soql)
    p(response)
    return response
示例#6
0
def main():
    """ SOQLのテスト実行用。データの確認もこれが手っ取りばやい
    """

    msf = LibMtSalesForce()
    # soql = "SELECT Name FROM CodeMaster__c WHERE Id='%s'" %(id)
    # soql = "SELECT Name, CodeKind__c FROM CodeMaster__c"
    soql = "SELECT id FROM AccountSymptom__c"

    response = msf.query(soql)
    p(response)
    return response
示例#7
0
def main():
    """ CodeMasterからID指定でNameを取得 
    """

    args = sys.argv
    check_args(args, 1)
    id = args[1]

    msf = LibMtSalesForce()
    soql = "SELECT Name FROM CodeMaster__c WHERE Id='%s'" % (id)

    response = msf.query(soql)
    p(response)
    return response
def main():
    """ 指定Accountの症状取得
    """

    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()

    soql = "SELECT (SELECT Name, MstSymptom__c, Other__c FROM AccountAccountSymptoms__r) " \
        "FROM Account WHERE Id ='%s'" % (args[1])

    response = msf.query(soql)
    p(response)
    return response
示例#9
0
def main():
    """ 指定Accountの勤務先取得
    """

    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()

    soql = "SELECT (SELECT Name, AddressClass__c, MstWorkClassId__c, EmpName__c, EmpClass__c, Zip__c, Pref__c, City__c, Address__c, Building__c, Tel__c FROM AccountAddresses__r)  " \
        "FROM Account WHERE Id ='%s'" % (args[1])

    response = msf.query(soql)
    p(response)
    return response
示例#10
0
def main():
    """ 指定Accountのオプトイン情報取得
        001N000001HsLSUIA3
    """

    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()
    soql = "SELECT (SELECT Id, OptinCP2CP__c FROM AccountOptinCPs__r) " \
        "FROM Account WHERE Id ='%s'" % (args[1])

    response = msf.query(soql)
    p(response)
    return response
def main():
    """ 指定Account項目一通り取得
    """

    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()

    soql = "SELECT Id, MstMemberClassId__c, Name, LastName__c, FirstName__c, Kana__c, KanaSei__c, KanaMei__c, MailAddr__c, Sex__c, Birthday__c, Nickname__c, MstLicenseId__c, LicenseNumber__c, LicenseYear__c, MstUniversityId__c, UniversityOther__c, StudentMstUniversityId__c, StudentUniversityOther__c, StudentGraduationDay__c, StudentInternHospital__c, StudentWorkingForm__c, StudentHospitalDepartment__c, ImsMonitor__c, MailStatus__c, ResearchStatus__c, ConfStatus__c, MtPostFlag__c, PaidStatus__c, MtwMemberFlag__c, MtNumber__c, DcfNumber__c, DeliveryIds__c, Point__c, OptinStatus__c " \
        "FROM Account WHERE Id = '%s' AND deleteFlag__c = FALSE " % (args[1])

    response = msf.query(soql)
    p(response)
    return response
def main():
    """ 指定Accountのカテゴリー取得
    """

    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()

    soql = "SELECT (SELECT Name, MstCategory__c, Other__c, IsPrimary__c FROM AccountAccountCategories__r) " \
        "FROM Account WHERE Id ='%s'" % (args[1])

    response = msf.query(soql)
    p(response)
    return response
示例#13
0
def main():
    """ 指定Accountの専門医取得
        001N000001HsLSUIA3
    """

    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()

    soql = "SELECT (SELECT Name, MstSpeciality__c, Other__c FROM AccountAccountSpecialities__r) " \
        "FROM Account WHERE Id ='%s'" % (args[1])

    response = msf.query(soql)
    p(response)
    return response
示例#14
0
def main():
    """  codeKindを指定してCodeMasterを取得する
        # code_kindの例
        akasatana
        position
        work_division
    """

    args = sys.argv
    check_args(args, 1)

    msf = LibMtSalesForce()
    soql = "SELECT Id, CodeKind__c, Code__c, Kubun__c, Name, ValueKana__c, ValueEng__c FROM CodeMaster__c " \
        "WHERE CodeKind__c = '%s'" % (args[1])

    response = msf.query(soql)
    p(response)
    return response
示例#15
0
def main():
    """ AccountIDを指定して、該当ユーザーの主たる勤務先のIDを取得する
    """

    # dummy_id :001N000001HsLSUIA3
    args = sys.argv
    check_args(args, 1)

    account_id = args[1]
    msf = LibMtSalesForce()

    soql =  \
        "SELECT (SELECT Id, AddressClass__c FROM " \
        "AccountAddresses__r WHERE AddressClass__c = '主たる勤務先') " \
        "FROM Account WHERE Id = '%s'" % (account_id)

    response = msf.query(soql)

    account_id = response['records'][0]['AccountAddresses__r']['records'][0][
        'Id']
    p(account_id)
    return account_id
def main():
    """ 主たる勤務先の情報を取得する? (excel10行目)

    """

    # dummy_id :001N000001HsLSUIA3
    args = sys.argv
    check_args(args, 1)

    account_category2_address = args[1]
    msf = LibMtSalesForce()

    soql = "SELECT Id,Name,MstCategory__c,Other__c,IsPrimary__c FROM AccountCategory__c" \
        "WHERE AccountCategory2Address__c='%s' AND IsPrimary__c = true" % (
            account_category2_address)

    response = msf.query(soql)

    account_id = response['records'][0]['AccountAddresses__r']['records'][0][
        'Id']
    p(account_id)
    return account_id
示例#17
0
def main():
    p("main")
    msf = LibMtSalesForce()

    p(msf.query("SELECT Id, Name FROM Organization"))